test-runner-cli

0.1.0 • Public • Published

test-runner-cli CI

A simple way to run tests

Features

  • Simple no API to learn, zero-config
  • Natively supports ESM

Install

npm install test-runner-cli

Usage

test-runner [dir|file] # default is dir `.`

Create a test file endsWith .test.js or naming test.js and use Node's built-in assert module, then export the test function.

import {strict as assert} from 'assert' // Node <=16
// import { equal } from 'assert/strict'  // Node >=16

export function testSomeThing() {
	assert.equal(1 + 2, 3)
}

Edit package.json:

{
	"scripts": {
		"test": "test-runner"
	}
}

Run test files:

npm test  // run all test files `.`
npx test-runner-cli fixtures test.js // run specify directory or file

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i test-runner-cli

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

2.82 kB

Total Files

3

Last publish

Collaborators

  • yuler