Only Babel 7 is supported. Check out for Babel 5 and 6 test runner
npm i enhanced-tape-runner --save-dev
Simply run the binary with one or multiple paths to your test directories/files:
node_modules/.bin/enhanced-tape-runner test test/things/index_test.js
This command does 3 things:
- Enables Babel by requiring
@babel/polyfill
and@babel/register
- Adds an
unhandledRejection
event listener toprocess
which throws informative error on any unhandled promise rejection - Requires all files in
test
directory matchingtest/**/_test.*
glob pattern and also requirestest/things/index_test.js
You can supply a --no-handle-rejections
option to this command to disable unhandledRejection event listener.
Example usage in shell script file:
#!/bin/bash
NODE_ENV=test node_modules/.bin/enhanced-tape-runner "$@" | node_modules/.bin/tap-spec
MIT