Skip to content

[v7-rc.1] ng test in createApplication=false workspace passes with failed spec #12456

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
lacolaco opened this issue Oct 3, 2018 · 2 comments
Closed

Comments

@lacolaco
Copy link
Contributor

lacolaco commented Oct 3, 2018

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
- [ ] e2e
- [x] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 7.0.0-rc.1
Node: 10.11.0
OS: darwin x64
Angular: 7.0.0-rc.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.9.0-rc.1
@angular-devkit/build-angular      0.9.0-rc.1
@angular-devkit/build-ng-packagr   0.9.0-rc.1
@angular-devkit/build-optimizer    0.9.0-rc.1
@angular-devkit/build-webpack      0.9.0-rc.1
@angular-devkit/core               7.0.0-rc.1
@angular-devkit/schematics         7.0.0-rc.1
@angular/cli                       7.0.0-rc.1
@ngtools/json-schema               1.1.0
@ngtools/webpack                   7.0.0-rc.1
@schematics/angular                7.0.0-rc.1
@schematics/update                 0.9.0-rc.1
ng-packagr                         4.2.0
rxjs                               6.3.3
typescript                         3.1.1
webpack                            4.19.1

Repro steps

  1. ng new foobar --create-application=false
  2. ng generate lib foobar-lib
  3. Add broken spec
  it('should create', () => {
    expect(null).toBeTruthy();
  });
  1. ng test --no-watch
  2. Passed (bug)
  3. ng test --no-watch --reporters=progress
  4. Failed (correct)

The log given by the failure

> ng test --no-watch
04 10 2018 00:25:46.067:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
04 10 2018 00:25:46.070:INFO [launcher]: Launching browser Chrome with unlimited concurrency
04 10 2018 00:25:46.074:INFO [launcher]: Starting browser Chrome
04 10 2018 00:25:53.388:INFO [Chrome 69.0.3497 (Mac OS X 10.12.6)]: Connected on socket JYXPPPo6Mw0pHIIfAAAA with id 51502435

No failure.

Desired functionality

wIth --reporters option, it fails properly.

> ng test --no-watch --reporters=progress
04 10 2018 00:28:20.343:INFO [karma]: Karma v3.0.0 server started at http://0.0.0.0:9876/
04 10 2018 00:28:20.353:INFO [launcher]: Launching browser Chrome with unlimited concurrency
 10% building modules 2/3 modules 1 active ...rojects/test-lib/src sync /\.spec\.ts$/04 10 2018 00:28:20.364:INFO [launcher]: Starting browser Chrome
04 10 2018 00:28:25.694:INFO [Chrome 69.0.3497 (Mac OS X 10.12.6)]: Connected on socket qfBoO8aVAJ31QhNdAAAA with id 5910633
Chrome 69.0.3497 (Mac OS X 10.12.6) TestLibComponent should create FAILED
        Expected null to be truthy.
            at UserContext.<anonymous> (http://localhost:9876/src/lib/test-lib.component.spec.ts?:23:18)
            at ZoneDelegate.push.../../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:9876/Users/laco/Works/v7rc-test-example-lib/node_modules/zone.js/dist/zone.js?:388:1)
            at ProxyZoneSpec.push.../../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke (http://localhost:9876/Users/laco/Works/v7rc-test-example-lib/node_modules/zone.js/dist/zone-testing.js?:288:1)
            at ZoneDelegate.push.../../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:9876/Users/laco/Works/v7rc-test-example-lib/node_modules/zone.js/dist/zone.js?:387:1)
Chrome 69.0.3497 (Mac OS X 10.12.6): Executed 2 of 2 (1 FAILED) (0.101 secs / 0.094 secs)
TOTAL: 1 FAILED, 1 SUCCESS

Mention any other details that might be useful

This behavior may relate to #12455 . --reporters option regression affects multiple locations.

@alan-agius4
Copy link
Collaborator

Duplicate of #12455

@alan-agius4 alan-agius4 marked this as a duplicate of #12455 Oct 3, 2018
@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 8, 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

2 participants