Skip to content

ng test does not react properly when detecting a code change #9901

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
FrancescoBorzi opened this issue Mar 8, 2018 · 4 comments
Closed

ng test does not react properly when detecting a code change #9901

FrancescoBorzi opened this issue Mar 8, 2018 · 4 comments

Comments

@FrancescoBorzi
Copy link

Versions

Node: 8.9.1
OS: linux x64
Angular: 5.2.7
... animations, common, compiler, core, forms, http
... platform-browser, platform-browser-dynamic, router

@angular/cli: 1.7.1
@angular/compiler-cli: 5.2.6
@angular/language-service: 5.2.6
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0

Repro steps

  • Setup an Angular app with many unit test cases
  • Run your unit tests
  • While they are running, change a file and force to run a single case set to run (by using fdescribe or fit)

Observed behavior

It will recompile (or at least it looks like it) but it will still keep continuing the previous run instead of starting a new one with the specific test cases set.

So every time I need to use fdescribe or fit I need either to wait that the current test run finishes or I have to manually kill and restart `ng test

Desired behavior

Whenever something changes in the code, ng test should just recompile and rerun again from the beginning and taking into account any changes related to the test cases set to run (e.g. any usage of fdescribe or fit should be taken into account without the need of restarting the cli process)

@jplew
Copy link

jplew commented Mar 8, 2018

might be related to my issue: #9906

@filipesilva
Copy link
Contributor

Thanks for reporting this issue. This issue was originally reported a long time ago and since then we've had many releases, one of which might have addressed this problem. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@FrancescoBorzi
Copy link
Author

@filipesilva done, tested on a newer Angular CLI version and the bug it's still the same.

As requested, I've opened a new issue: #13542

@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants