I'm running a single (Angular 8.2.1) unit test with:
ng test --main ./any.component.spec.ts
Running any single this way gives:
Error: AsyncTestZoneSpec is needed for the async() test helper but could not be found. Please make sure that your environment includes zone.js/dist/async-test.js
With
"@angular/compiler-cli": "^8.2.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
I believe running a single test may skip the karma.conf.js file thus the missing dep. But I'm not sure how to get single tests to run.
Any ideas would be appreciated.
Aucun commentaire:
Enregistrer un commentaire