( globalConfig: Config.GlobalConfig, global: Global.Global, )
| 253 | } |
| 254 | |
| 255 | export 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 | } |
no test coverage detected