Skip to content

'ng test' does not 'exit' after running unit test, something keeps running #978

@reingroot

Description

@reingroot

When I run ng test my unit tests are run successfully. With logLevel: config.LOG_DEBUG it reports the following:

01 06 2016 16:50:15.040:DEBUG [karma]: Run complete, exiting.
01 06 2016 16:50:15.040:DEBUG [launcher]: Disconnecting all browsers
01 06 2016 16:50:15.521:DEBUG [launcher]: Process Chrome exited with code 0
01 06 2016 16:50:15.521:DEBUG [temp-dir]: Cleaning temp dir /var/folders/bd/5l9p70517qgg73659f70pzgw0000gn/T/karma-14746095
01 06 2016 16:50:15.574:DEBUG [launcher]: Finished all browsers

But it doesn't release the terminal. I don't get back the prompt. So it seems something keeps running. I have this locally with the configuration below. As well as on a docker image (pimterry/node-karma).

This prevents me from running the unit tests on my CI environment because the process waits for the prompt to return.

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    OSX El Capitan 10.11.5
  1. Versions. Please run ng --version. If there's nothing outputted, please
    run in a Terminal:
    node --version
    And paste the result here.
    angular-cli: 1.0.0-beta.5
    node: 4.4.0
    os: darwin x64
  2. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    It was created with the CLI
  3. The log given by the failure. Normally this include a stack trace and some
    more information.
    There is no log. It is just that my prompt doesn't return.
  4. Mention any other details that might be useful.
    In the karma config: 'autowatch=false' and 'singleRun=true'

I have also tried this with a fresh project generated with Angular CLI and nothing changed except the above settings in the Karma config. It has the same issue.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions