Как запустить тесты e2e в Angular 7? - PullRequest
0 голосов
/ 24 декабря 2018

Когда я запускаю:

ng new ng-demo
cd ng-demo
ng e2e

, тогда терминал выводит:

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2018-12-24T09:11:46.656Z
Hash: c327cfcccf9319a7f705
Time: 8735ms
chunk {main} main.js, main.js.map (main) 9.76 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 223 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 16.3 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 3.43 MB [initial] [rendered]
[17:11:46] I/file_manager - creating folder /Users/xxx/git/ng-demo/node_modules/protractor/node_modules/webdriver-manager/selenium
[17:11:46] I/config_source - curl -o/Users/xxx/git/ng-demo/node_modules/protractor/node_modules/webdriver-manager/selenium/chrome-response.xml https://chromedriver.storage.googleapis.com/
ℹ 「wdm」: Compiled successfully.

Я открываю http://localhost:4200/ в браузере, веб-страница верна, но ничего не происходитвывод как: should display welcome message ....Через некоторое время терминал выдает ошибку:

events.js:167
  throw er; // Unhandled 'error' event
  ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
    at Request.onRequestError (/Users/xxx/git/ng-demo/node_modules/request/request.js:881:8)
    at ClientRequest.emit (events.js:187:15)
    at TLSSocket.socketErrorListener (_http_client.js:391:9)
    at TLSSocket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Моя среда здесь:

Angular CLI: 7.1.4
Node: 10.13.0
OS: darwin x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.11.4
@angular-devkit/build-angular     0.11.4
@angular-devkit/build-optimizer   0.11.4
@angular-devkit/build-webpack     0.11.4
@angular-devkit/core              7.1.4
@angular-devkit/schematics        7.1.4
@ngtools/webpack                  7.1.4
@schematics/angular               7.1.4
@schematics/update                0.11.4
rxjs                              6.3.3
typescript                        3.1.6
webpack                           4.23.1

Я что-то пропустил?

...