(fn)
| 4 | const SchedulerMatchers = require('./schedulerTestMatchers'); |
| 5 | |
| 6 | function captureAssertion(fn) { |
| 7 | // Trick to use a Jest matcher inside another Jest matcher. `fn` contains an |
| 8 | // assertion; if it throws, we capture the error and return it, so the stack |
| 9 | // trace presented to the user points to the original assertion in the |
| 10 | // test file. |
| 11 | try { |
| 12 | fn(); |
| 13 | } catch (error) { |
| 14 | return { |
| 15 | pass: false, |
| 16 | message: () => error.message |
| 17 | }; |
| 18 | } |
| 19 | return { pass: true }; |
| 20 | } |
| 21 | |
| 22 | function assertYieldsWereCleared(Scheduler) { |
| 23 | const actualYields = Scheduler.unstable_clearYields(); |
no outgoing calls
no test coverage detected