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
Angular unit/karma tests can not connect to Chrome? #1
Comments
Hi, I'm happy that my work may be useful for someone. 😃 If you haven't already done that, replace
by
With this change, on a fresh angular-cli project, I get this :
|
Thanks! I'll try this out and get back to you with the results. |
It worked! Got both the unit and the protractor test working! :) Can I ask you another question? How do you start both your webserver ( I'm currently using the following bash script:
|
In angular 1, I used grunt or gulp to launch e2e tests at serve ending, but I’ve stopped used them since angular2 helped me discover system.js, and since angular2 teams use broccoli. In angular-cli e2e tests, they have a clean way to execute ng e2e after ng serve
|
Ah! That's awesome! How do you kick it of? Just put this script in a file (for example tests.js) and then run |
Just put it in a file, and run it with node. It isn't a built-in angular2 functionality, it's just a piece of code from their e2e tests. It could be a cool functionality, but i think they don't want complicate the cli. |
Ah, I see they use it in their e2e test for testing the CLI itself (https://github.com/angular/angular-cli/blob/master/tests/e2e/e2e_workflow.spec.js). Pretty cool. For now I'll stay with my command line script as it also does the job and is far less code ;) By the way. I have seen my unit tests AND e2e tests working in your Docker. So that's great. Thanks for the support! Kind regards, |
Dear Sylvain,
I am very happy to have found your Docker image because I have been trying to get my Angular2 e2e/Protractor tests to run in a Docker environment. With this image that works.
However, my Angular unit/karma tests are not able to run. I get the following error message:
Interestingly, on this image: https://hub.docker.com/r/pimterry/node-karma/~/dockerfile/ I CAN run my unit tests. But then the e2e tests fail.
I have been staring myself blind trying to figure out what's going on. But I am no Docker expert by any means. I hope you can shine some light on what I am missing and what I can do to fix it. Either in your image or otherwise.
Kind regards,
Rein
The text was updated successfully, but these errors were encountered: