UNPKG

@tapjs/run

Version:

Command-line interface for the node-tap runner

20 lines 626 B
import { foregroundChild } from 'foreground-child'; import { resolve } from 'path'; const node = process.execPath; export const runAfter = (t, argv, config) => { const after = config.get('after'); if (after) { t.after(async () => { await new Promise(res => { foregroundChild(node, [...argv, resolve(after)], (code, signal) => { res(); if (code || signal) return; return false; }); }); }); return resolve(after); } }; //# sourceMappingURL=after.js.map