I am encountering an issue while trying to execute the unit test for my Angular 2 Application using ng test
. The error message I keep receiving is:
ERROR in Entry module not found: Error: Can't resolve
'/Users/username/Dev/dashboard/src/test.ts' in '/Users/username/Dev/dashboard/node_modules/@angular/cli/models/webpack-configs'
28 07 2017 15:18:35.337:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
28 07 2017 15:18:35.441:INFO [launcher]: Trying to start Chrome again (1/2).
28 07 2017 15:19:35.447:WARN [launcher]: Chrome have not captured in 60000 ms, killing.
28 07 2017 15:19:35.587:INFO [launcher]: Trying to start Chrome again (2/2).
The version of Angular CLI after npm update is: @angular/cli: 1.2.6
and the Node version being used is: node: 8.0.0
It's worth noting that other commands like ng build -prod
and ng serve
are functioning correctly without any errors, allowing me to access the application on the browser.
A few days ago, I deleted all the .spec.ts
files from the directories as methods such as:
describe(), beforeEach(), it()
were unable to be located. Upon investigation, I discovered that removing these files did not cause the app to break. However, today I recreated them in order to run the unit tests for the application.
If you have any insights or suggestions, they would be greatly appreciated. Thank you.