Skip to content

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

@FrancescoBorzi

Description

@FrancescoBorzi

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions