0

I create my application using Angular 7, here is my package.json snippets:

"scripts": {
    "ng": "ng",
    "standardize": "prettier **/*.ts --write",
    "start": "npm run standardize && ng serve --port 5000",
    "build": "npm run standardize && ng build",
    "test:debug": "ng test --source-map=false",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
  },
"dependencies": {
    "@angular/animations": "^7.1.4",
    "@angular/cdk": "~7.2.0",
    "@angular/common": "^7.1.4",
    "@angular/compiler": "^7.1.4",
    "@angular/core": "^7.1.4",
    "@angular/flex-layout": "^7.0.0-beta.22",
    "@angular/forms": "^7.1.4",
    "@angular/http": "^7.1.4",
    "@angular/material": "^7.2.0",
    "@angular/platform-browser": "^7.1.4",
    "@angular/platform-browser-dynamic": "^7.1.4",
    "@angular/router": "^7.1.4",
    "core-js": "^2.6.1",
    "hammerjs": "^2.0.8",
    "rxjs": "~6.3.3",
    "rxjs-tslint": "^0.1.6",
    "zone.js": "~0.8.26"
  },
"devDependencies": {
    "@angular-devkit/build-angular": "^0.8.8",
    "@angular/cli": "^7.1.4",
    "@angular/compiler-cli": "^7.1.4",
    "@angular/language-service": "^7.1.4",
    "@types/jasmine": "^2.8.14",
    "@types/jasminewd2": "^2.0.6",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.3.0",
    "cross-conf-env": "^1.1.2",
    "dev-norms": "1.3.6",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "npm-run-all": "^4.1.5",
    "prettier": "^1.15.3",
    "protractor": "^5.4.2",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "^3.1.1",
    "webpack-dev-server": "^3.1.14"
  }

It's time to do some tests, but when i try to test by typing in terminal "npm run e2e" it gives me 0 feedback except this one:

PS E:\dev\local-weather-app> npm run e2e

> localcast-weather@1.1.1 e2e E:\dev\local-weather-app
> ng e2e

PS E:\dev\local-weather-app>

Previously I executed "npm test" and that command worked correctly

A. Isakau
  • 163
  • 1
  • 3
  • 13
  • I have found something that might be related to this: https://github.com/angular/angular-cli/issues/13113 https://github.com/angular/angular-cli/issues/13376 – A. Isakau Jan 08 '19 at 15:00

1 Answers1

0

If you are trying to run protractor test

Add the below one to your package.json

"e2e": "protractor config.js",

Then run npm run e2e

Now your test will run.

Hope it helps you

Madhan Raj
  • 1,404
  • 1
  • 7
  • 13
  • Thanks for answer, but I got an errno105 [Cannot find module 'E:\dev\lemon-mart\config.js]. I have create new project and e2e test doesn't work out of box [errno 1, Error: write EPIPE]. So I think it might be associated with this problem. This issue was opened and closed on github and as you can see this is an Angular bug [github.com/angular/angular-cli/issues/13376]. – A. Isakau Jan 09 '19 at 09:22
  • please update the folder structure of your project in the question. – Madhan Raj Jan 09 '19 at 09:45
  • Add the relative path of your config. eg.` protractor /src/config.js` – Madhan Raj Jan 10 '19 at 06:38