(Factory)
| 388 | } |
| 389 | |
| 390 | function runInParentContext(Factory) { |
| 391 | function run(name, options, fn, overrides) { |
| 392 | const parent = testResources.get(executionAsyncId()) || lazyBootstrapRoot(); |
| 393 | const subtest = parent.createSubtest(Factory, name, options, fn, overrides); |
| 394 | if (parent instanceof Suite) { |
| 395 | return PromiseResolve(); |
| 396 | } |
| 397 | |
| 398 | return startSubtestAfterBootstrap(subtest); |
| 399 | } |
| 400 | |
| 401 | const test = (name, options, fn) => { |
| 402 | const overrides = { |
| 403 | __proto__: null, |
| 404 | loc: getCallerLocation(), |
| 405 | }; |
| 406 | |
| 407 | return run(name, options, fn, overrides); |
| 408 | }; |
| 409 | ArrayPrototypeForEach(['expectFailure', 'skip', 'todo', 'only'], (keyword) => { |
| 410 | test[keyword] = (name, options, fn) => { |
| 411 | const overrides = { |
| 412 | __proto__: null, |
| 413 | [keyword]: true, |
| 414 | loc: getCallerLocation(), |
| 415 | }; |
| 416 | |
| 417 | return run(name, options, fn, overrides); |
| 418 | }; |
| 419 | }); |
| 420 | return test; |
| 421 | } |
| 422 | |
| 423 | function hook(hook) { |
| 424 | return (fn, options) => { |
no test coverage detected
searching dependent graphs…