3 ms·
test/a-test.js const assert = require(‘assert’) exports.example = () => assert.fail(‘implement me’) test/index.js // Creates a giant array of test
by assertmezaddy 8y ago
test/a-test.js
const assert = require(‘assert’)
exports.example = () =>
assert.fail(‘implement me’)
test/index.js
// Creates a giant array of test functions from multiple
// "suites"/vanilla node modules and executes them.
const test = suites =>
suites
.map(Object.values)
.reduce((all, tests) => all.concat(tests), [])
.forEach(test => test())
test([
require(‘./a-test’)
])
package.json
...
"scripts": {
"test": "node test/"
}
...