MCPcopy
hub / github.com/jestjs/jest / jasmineAsyncInstall

Function jasmineAsyncInstall

packages/jest-jasmine2/src/jasmineAsyncInstall.ts:255–280  ·  view source on GitHub ↗
(
  globalConfig: Config.GlobalConfig,
  global: Global.Global,
)

Source from the content-addressed store, hash-verified

253}
254
255export default function jasmineAsyncInstall(
256 globalConfig: Config.GlobalConfig,
257 global: Global.Global,
258): void {
259 const jasmine = global.jasmine;
260 const mutex = pLimit(globalConfig.maxConcurrency);
261
262 const env = jasmine.getEnv();
263 env.it = promisifyIt(env.it, env, jasmine);
264 env.fit = promisifyIt(env.fit, env, jasmine);
265 global.it.concurrent = (env => {
266 const concurrent = makeConcurrent(
267 env.it,
268 env,
269 mutex,
270 ) as Global.ItConcurrentExtended;
271 concurrent.only = makeConcurrent(env.fit, env, mutex);
272 concurrent.skip = makeConcurrent(env.xit, env, mutex);
273 return concurrent;
274 })(env);
275 global.fit.concurrent = makeConcurrent(env.fit, env, mutex);
276 env.afterAll = promisifyLifeCycleFunction(env.afterAll, env);
277 env.afterEach = promisifyLifeCycleFunction(env.afterEach, env);
278 env.beforeAll = promisifyLifeCycleFunction(env.beforeAll, env);
279 env.beforeEach = promisifyLifeCycleFunction(env.beforeEach, env);
280}

Callers 1

jasmine2Function · 0.85

Calls 3

promisifyItFunction · 0.85
makeConcurrentFunction · 0.85

Tested by

no test coverage detected