mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 11:12:18 +00:00
2208948e1b
Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/53866 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
25 lines
389 B
JavaScript
25 lines
389 B
JavaScript
import { run } from 'node:test';
|
|
import { tap } from 'node:test/reporters';
|
|
import { parseArgs } from 'node:util';
|
|
|
|
const options = {
|
|
file: {
|
|
type: 'string',
|
|
},
|
|
};
|
|
const {
|
|
values,
|
|
positionals,
|
|
} = parseArgs({ args: process.argv.slice(2), options });
|
|
|
|
let files;
|
|
|
|
if (values.file) {
|
|
files = [values.file];
|
|
}
|
|
|
|
run({
|
|
files,
|
|
watch: true
|
|
}).compose(tap).pipe(process.stdout);
|