MCPcopy Index your code
hub / github.com/nodejs/node / run

Function run

lib/internal/test_runner/runner.js:697–1122  ·  view source on GitHub ↗
(options = kEmptyObject)

Source from the content-addressed store, hash-verified

695}
696
697function run(options = kEmptyObject) {
698 validateObject(options, 'options');
699
700 let {
701 testNamePatterns,
702 testSkipPatterns,
703 testTagFilters,
704 shard,
705 coverageExcludeGlobs,
706 coverageIncludeGlobs,
707 } = options;
708 const {
709 concurrency,
710 timeout,
711 signal,
712 files,
713 forceExit,
714 inspectPort,
715 isolation = 'process',
716 watch,
717 setup,
718 globalSetupPath,
719 only,
720 globPatterns,
721 coverage = false,
722 lineCoverage = 0,
723 branchCoverage = 0,
724 functionCoverage = 0,
725 randomize: suppliedRandomize,
726 randomSeed: suppliedRandomSeed,
727 execArgv = [],
728 argv = [],
729 cwd = process.cwd(),
730 rerunFailuresFilePath,
731 env,
732 } = options;
733
734 if (files != null) {
735 validateArray(files, 'options.files');
736 }
737 if (watch != null) {
738 validateBoolean(watch, 'options.watch');
739 }
740 if (forceExit != null) {
741 validateBoolean(forceExit, 'options.forceExit');
742
743 if (forceExit && watch) {
744 throw new ERR_INVALID_ARG_VALUE(
745 'options.forceExit', watch, 'is not supported with watch mode',
746 );
747 }
748 }
749 if (only != null) {
750 validateBoolean(only, 'options.only');
751 }
752 if (globPatterns != null) {
753 validateArray(globPatterns, 'options.globPatterns');
754 }

Callers 1

test_runner.jsFile · 0.50

Calls 15

createRandomSeedFunction · 0.85
convertStringToRegExpFunction · 0.85
emitExperimentalWarningFunction · 0.85
createTestTreeFunction · 0.85
createTestFileListFunction · 0.85
watchFilesFunction · 0.85
runTestFileFunction · 0.85
isAbsoluteFunction · 0.85
loadPreloadModulesFunction · 0.85
getOptionValueFunction · 0.85

Tested by

no test coverage detected