Skip to content

Latest commit

 

History

History

test

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Tests

Test commands.

This directory contains make rules for running project unit tests.

Usage

Usage: make <command> [<ENV_VAR>=<value> <ENV_VAR>=<value> ...]

Commands

test

Runs unit tests.

$ make test

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test TESTS_FILTER='.*/blas/base/dasum/.*'

test-files

Runs a specified list of files containing unit tests.

$ make test-files FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-local

Runs unit tests in the local environment.

$ make test-local

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-local TESTS_FILTER='.*/blas/base/dasum/.*'

test-files-local

Runs, in the local environment, a specified list of files containing unit tests.

$ make test-files-local FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-summary

Runs unit tests and summarizes aggregated TAP output.

$ make test-summary

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-summary TESTS_FILTER='.*/blas/base/dasum/.*'

test-files-summary

Runs, in the local environment, a specified list of files containing unit tests.

$ make test-files-summary FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-tap

Runs unit tests and generates raw TAP output.

$ make test-tap

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-tap TESTS_FILTER='.*/blas/base/dasum/.*'

test-files-tap

Runs, in the local environment, a specified list of files containing unit tests and generates raw TAP output.

$ make test-files-tap FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-xunit

Runs unit tests and converts TAP output to xUnit XML.

$ make test-xunit

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-xunit TESTS_FILTER='.*/blas/base/dasum/.*'

test-files-xunit

Runs, in the local environment, a specified list of files containing unit tests and converts TAP output to xUnit XML.

$ make test-files-xunit FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

JavaScript

test-javascript

Runs JavaScript unit tests.

$ make test-javascript

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript TESTS_FILTER='.*/blas/base/dasum/.*'

test-javascript-files

Runs a specified list of files containing JavaScript unit tests.

$ make test-javascript-files FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-javascript-local

Runs JavaScript unit tests in the local environment.

$ make test-javascript-local

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript-local TESTS_FILTER='.*/blas/base/dasum/.*'

test-javascript-files-local

Runs, in the local environment, a specified list of files containing JavaScript unit tests.

$ make test-javascript-files-local FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-javascript-summary

Runs JavaScript unit tests and summarizes aggregated TAP output.

$ make test-javascript-summary

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript-summary TESTS_FILTER='.*/blas/base/dasum/.*'

test-javascript-files-summary

Runs, in the local environment, a specified list of files containing JavaScript unit tests.

$ make test-javascript-files-summary FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-javascript-min

Runs JavaScript unit tests and minimizes aggregated TAP output.

$ make test-javascript-min

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript-min TESTS_FILTER='.*/blas/base/dasum/.*'

test-javascript-files-min

Runs, in the local environment, a specified list of files containing JavaScript unit tests and minimizes aggregated TAP output.

$ make test-javascript-files-min FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-javascript-tap

Runs JavaScript unit tests and generates raw TAP output.

$ make test-javascript-tap

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript-tap TESTS_FILTER='.*/blas/base/dasum/.*'

test-javascript-files-tap

Runs, in the local environment, a specified list of files containing JavaScript unit tests and generates raw TAP output.

$ make test-javascript-files-tap FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

test-javascript-xunit

Runs JavaScript unit tests and converts TAP output to xUnit XML.

$ make test-javascript-xunit

The command supports the following environment variables:

  • TESTS_FILTER: file path pattern; e.g., .*/blas/base/dasum/.*.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.
$ make test-javascript-xunit TESTS_FILTER='.*/blas/base/dasum/.*'

test-javascript-files-xunit

Runs, in the local environment, a specified list of files containing JavaScript unit tests and converts TAP output to xUnit XML.

$ make test-javascript-files-xunit FILES='/foo/test.js /bar/test.js'

The command supports the following environment variables:

  • FILES: list of test file paths.
  • FAST_FAIL: flag indicating whether to stop running tests upon encountering a test failure.

Notes

  • Commands supporting a FILES environment variable are useful when wanting to run a list of test files generated by some other command (e.g., a list of changed test files obtained via git diff).
  • Commands supporting a TESTS_FILTER environment variable are useful when wanting to glob for test files (e.g., run all tests for a particular package).
  • For -local commands, "local" refers to the local development environment, as opposed to running in a headless browser or on CI.