0.0.10 • Published 4 years ago

inforce v0.0.10

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

:cop: Inforce

A simple function based test runner. Its not BDD. Does not include an assertion library - only a test collector and test runner.

:package: Install

npm install --dev inforce
or
yarn add --dev inforce

:wrench: Usage

Add as an npm script in package.json.

"scripts": {
  "test": "inforce",
  "test-example": "inforce  --targetPath ./example.test.js",
  "test-verbose": inforce --level verbose
}

:abacus: Options

Check out the main function's params/defaults here.

--targetPath

The relative path to search for tests. Can be directory or file. Deafults to ./src.

--testFileRegex

The pattern to use when filtering test files. Defaults to .*\.test\.js.

-- testFnRegex

The pattern to use when filtering exported functions from test modules. Defaults to ^test.*. If you want to execute all functions exported from a test module -- so you don't have to name test functions with test -- set this to something like .+.

--level

The log level to use.

  • slient: log nothing
  • default: log enough for normal dev use (default)
  • verbose: log lots. helpful for debugging test collection/running not working as you expect
  • debug: log everything. helpful for debugging issues with the inforce project

Example Output

Example Test File

See example.test.js