Skip to content

ng e2e -s or -w doesn't make any difference #4855

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

Closed
ctrl-brk opened this issue Feb 21, 2017 · 6 comments
Closed

ng e2e -s or -w doesn't make any difference #4855

ctrl-brk opened this issue Feb 21, 2017 · 6 comments

Comments

@ctrl-brk
Copy link

What's the purpose of these flags? For me they don't do anything.
ng e2e always runs tests once and exits. Next time you have to rebuild everything again which takes forever. How can I make it to behave like ng serve, so it sits there and watches for changes?

@ctrl-brk
Copy link
Author

ctrl-brk commented Mar 4, 2017

Still don't see a purpose for them in rc.1
How do I use it?

@filipesilva
Copy link
Contributor

The --serve flag controls wether or not ng e2e will also serve your project. The default is true.

You can do ng e2e --no-serve to not serve. That's useful if you want use e2e on an already running server.

The --watch flag is passed on to the server with --serve is true. It defaults to false on ng e2e because it would be bad for live reload to kick in and reset your test while you're running ng e2e.

@ctrl-brk
Copy link
Author

ctrl-brk commented Mar 13, 2017

That's not the behavior I see. For me ng e2e runs just once and exits no matter what parameters I use.

@jculverwell
Copy link

ng e2e --no-serve is working fine for me

@filipesilva
Copy link
Contributor

@ctrl-brk the server (same as ng serve) is what makes use of the --watch flag, the e2e test itself does not. An example of this behaviour would be that the browser auto reloads in the middle of an e2e test because you made a code change. This would break the e2e test.

I think the functionality you are expecting is the one requested in #2861.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants