Skip to main content

function test.run

#run(options?: RunOptions): TestsStream

Note: shard is used to horizontally parallelize test running across machines or processes, ideal for large-scale executions across varied environments. It's incompatible with watch mode, tailored for rapid code iteration by automatically rerunning tests on file changes.

import { tap } from 'node:test/reporters';
import { run } from 'node:test';
import process from 'node:process';
import path from 'node:path';

run({ files: [path.resolve('./tests/test.js')] })
  .compose(tap)
  .pipe(process.stdout);

Parameters #

#options: RunOptions
optional

Configuration options for running tests.

Return Type #

Did you find what you needed?

Privacy policy