utap
v0.2.0
Published
Micro TAP formatter
Downloads
325
Readme
μtap
A micro TAP formatter that works very well with the Node >=18 built-in node:test
harness.
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.