Skip to content

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

Closed
@FrancescoBorzi

Description

@FrancescoBorzi

As requested by @filipesilva, I tested this issue again on a newer CLI version: #9901

The result is that the bug is exactly the same as before. As described in the original issue.

I post here my new ng --version as well as the (same) description of the bug.

Versions

Angular CLI: 7.2.3
Node: 10.15.0
OS: linux x64
Angular: 7.2.2
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.12.3
@angular-devkit/build-angular     0.12.3
@angular-devkit/build-optimizer   0.12.3
@angular-devkit/build-webpack     0.12.3
@angular-devkit/core              7.2.3
@angular-devkit/schematics        7.2.3
@angular/cli                      7.2.3
@ngtools/webpack                  7.2.3
@schematics/angular               7.2.3
@schematics/update                0.12.3
rxjs                              6.3.3
typescript                        3.2.4
webpack                           4.28.4

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions