Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot run npm run test on Chrome or PhantomJS #4654
I have almost fresh new project based on:
When I am trying to run npm run test with defaults, I am getting.
wird is that in npm run start everything works fine including routings, since I have impoterd in imports RouterModule in app.module.ts.
So I've tried to change to PhantomJS by installing:
In Karma i added:
and I am getting
I added also in pollyfills.ts (after npm run install --save-dev intl)
but still I cannot run tests, any ideas?
@ruffiem now I am getting on PhantomJS
I uncommented all core-js/es6 imports. Now I am getting on phantomjs and chrome
I would like only remind that npm run start works great. I can easly naviagte and so on using those routerLinks
This is not a CLI problem. This is an Angular testing StackOverflow type question.
In testing, you get a testing module that is different from your normal module. That's why
Check the component that has
And in the actual test:
Please check the official testing guide for more:
Same issue here with Angular2 CLI and Phantom.
Solved thanks to @ruffiem but for me worked uncomenting just:
Edit: needed to uncomment
I have enabled all the polyfills and change es5 as target, but still getting the the DOM Exception error
This issue has been automatically locked due to inactivity.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.