@tapjs/run
Version:
Command-line interface for the node-tap runner
18 lines • 575 B
JavaScript
import { foregroundChild } from 'foreground-child';
import { resolve } from 'path';
const node = process.execPath;
export const runBefore = (t, argv, config) => {
const before = config.get('before');
if (before) {
t.before(async () => new Promise(res => {
foregroundChild(node, [...argv, resolve(before)], (code, signal) => {
res();
if (code || signal)
return;
return false;
});
}));
return resolve(before);
}
};
//# sourceMappingURL=before.js.map