npm test

This runs a package's "test" script, if one was provided.

Version

The npm version depends on the Node.js version.

Runtime

Node.js Versions

Supported Languages

JavaScript

Official Documentation

https://docs.npmjs.com/cli/test

YAML Configuration

npm-test:

  • input:

    Patterns to include in execution and reports.

    Note: Inspecode runs npm test for each Node.js project and the input patterns are used for selecting Node.js projects containing input files. Therefore, the files excluded by the patterns are processed if they are contained in Node.js projects that also contain input files, and you may even see logs related to the excluded files in the job console.

  • ignore:

    Patterns to exclude from execution and reports.

    Note: Just like input:, the ignore patterns may not be applied completely when running npm test.

YAML Examples

  • With default options:

    inspecode:
      npm-test: default
    
  • With custom machine:

    inspecode:
      npm-test:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    

Resolving Dependencies

Inspecode searches your repository for package.json files having test scripts and runs npm install at each directory where package.json is placed in order to install dependencies such as test runner packages.

As of now, Inspecode can install:

  • packages available to the public on npm
  • packages provided from your private repositories which:
    • belong to the same GitHub organization or Bitbucket team as the repository on which npm test runs
    • have been already registered to Inspecode
    • can be accessed via http://<hostname>/<path>, https://<hostname>/<path>, ssh://git@<hostname>/<path> or git@<hostname>:<path>

results matching ""

    No results matching ""