const testFunction = require('./test.js'); const reporter = require('./reporter.js'); const createHarness = () => { const testList = []; const test = (description, spec) => testFunction(description, spec, testList); return { test, async report() { for (const t of testList) { for await (const a of t) { reporter(a); } } } }; }; const defaultTestHarness = createHarness(); process.nextTick(() => defaultTestHarness.report()); module.exports = defaultTestHarness;