utap

0.2.0 • Public • Published

μtap

A micro TAP formatter that works very well with the Node >=18 built-in node:test harness.

  • The output format is inspired by AVA.
  • Less than 100 lines of code, and a single chalk dependency.

Example output

Give it a try

node my.test.js | npx utap

Use it in your project

npm install --save-dev utap

Put your tests in tests/ directory (or wherever you like really)

In your package.json:

  "scripts": {
    "test": "find tests -type f -name '*.test.js' -exec echo \\# utap-src:{} \\; -exec node {} \\; | utap"
  },

Adding the # utap-src:{filename} comment in between individual test files' TAP output allows utap to report the filename together with test descriptions. Remove that part if you don't need it.

npm test

Note

I am not using the built-in node --test runner on purpose to allow for more flexibility.

Readme

Keywords

Package Sidebar

Install

npm i utap

Weekly Downloads

154

Version

0.2.0

License

MIT

Unpacked Size

173 kB

Total Files

7

Last publish

Collaborators

  • dmaevsky