Skip to content

ng e2e and ng test should behave equally as default (watch mode) #12932

Closed
@DanielHabenicht

Description

@DanielHabenicht

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [x] test
- [x] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Output from: node --version, npm --version and ng --version: Windows 10

node --version
v10.4.1
npm --version
6.4.1
 ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 7.0.2
Node: 10.4.1
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.10.2
@angular-devkit/core         7.0.2
@angular-devkit/schematics   7.0.2
@schematics/angular          7.0.2
@schematics/update           0.10.2
rxjs                         6.3.3
typescript                   3.1.3

Repro steps

  1. ng new project-to-reproduce
  2. The default behaviour of ng test and ng e2e are as following:
    ng test: Executed in watch mode. Command does not exit, has to be cancelled.
    ng e2e: Executed once. Command exits after tests are finished.

Desired functionality

Both commands should behave the same. This means either both should run in watch mode or both should execute once as default. Having a different behaviour on each of them is confusing.

In my opinion both should run only once and exit cleanly, as this does allow easier configuration of CI (without any changing of the config files or appending an option like --singleRun true) and does ensure that calling a command without any options does not get an automated script stuck.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions