MCPcopy
hub / github.com/TypeStrong/ts-node / test

Function test

src/test/testlib.ts:225–239  ·  view source on GitHub ↗
(...inputArgs: any[])

Source from the content-addressed store, hash-verified

223 );
224 }
225 function test(...inputArgs: any[]) {
226 assertOrderingForDeclaringTest();
227 // TODO is this safe to disable?
228 // X parallel tests will each invoke the beforeAll hook, but once()ification means each invocation will return the same promise, and tests cannot
229 // start till it finishes.
230 // HOWEVER if it returns a single shared state, can tests concurrently use this shared state?
231 // if(!automaticallyDoSerial && mustDoSerial) throw new Error('Cannot declare non-serial tests because you have declared a beforeAll() hook for this test suite.');
232 const { args, macros, title } = parseArgs(inputArgs);
233 return declareTest(
234 title,
235 macros,
236 automaticallyDoSerial ? avaTest.serial : avaTest,
237 args
238 );
239 }
240 test.serial = function (...inputArgs: any[]) {
241 assertOrderingForDeclaringTest();
242 const { args, macros, title } = parseArgs(inputArgs);

Callers 15

sourcemaps.spec.tsFile · 0.85
esm-loader.spec.tsFile · 0.85
suiteFunction · 0.85
basicFunction · 0.85
signalTestFunction · 0.85
register.spec.tsFile · 0.85
regression.spec.tsFile · 0.85
declareProjectFunction · 0.85

Calls 3

parseArgsFunction · 0.85
declareTestFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…