-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
when running ng test - got a 'router-outlet' is not a known element - error - Angular 4 #202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
getting the same here, |
For everyone else having this issue: in app.component.spec.ts
reference: |
using mokipedia's solution, not work for me. |
@mokipedia is awesome. My error gone. |
@mokipedia solution works fine for me, thxs guy 👍 |
@mokipedia Thanks, that's THE solution! Just in case someone uses the Atom's Angular snippet, the spec file does not include the "import" array by default so you will have to add it to the configureTestingModule by yourself, and include only the RouterTestingModule |
thats cool that it helps. |
Removed router-outlets in new html files. Moved things around a little. Played with imports across modules to resolve last two tests failing. References: coreui/coreui-free-bootstrap-admin-template#202 https://stackoverflow.com/questions/41019109/error-no-provider-for-router-while-writing-karma-jasmine-unit-test-cases
@mokipedia It worked! Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Trying to run "ng test" on angular4 starter application.
I am using :
node v8.1.4
npm 5.0.3
The text was updated successfully, but these errors were encountered: