diff --git a/test/parallel/test-runner-run-watch-mode.mjs b/test/parallel/test-runner-run-watch-mode.mjs new file mode 100644 index 00000000000000..0204cabe9bebf7 --- /dev/null +++ b/test/parallel/test-runner-run-watch-mode.mjs @@ -0,0 +1,19 @@ +import * as common from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { join } from 'node:path'; +import { describe, it, run } from 'node:test'; +import assert from 'node:assert'; + +const testFixtures = fixtures.path('test-runner'); + +describe('test runner watch mode', { concurrency: true }, () => { + + it('should run a test repeatedly when its dependencies change', async () => { + const stream = run({ files: [] }); + stream.setEncoding('utf8'); + stream.on('test:fail', common.mustNotCall()); + stream.on('test:pass', common.mustNotCall()); + // eslint-disable-next-line no-unused-vars + for await (const _ of stream); // TODO(MoLow): assert.snapshot + }); +});