Skip to content

Unable to run unit tests using npm scripts #4463

@m0t0r

Description

@m0t0r

Please provide us with the following information:

OS?

Linux (Ubuntu). Mac OSX (El Capitan)

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.30
node: 6.9.1
os: darwin x64

Repro steps.

I have npm script to run unit tests on CI

  "scripts": {
    "ng": "ng",
    "start": "ng serve --host 0.0.0.0",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "npm run ng -- test --single-run"
   ...

when I try to run npm t I get an error as shown below. It was working fine before beta.30.

The log given by the failure.

You have to be inside an angular-cli project in order to use the test command.

Mention any other details that might be useful.


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