(fn)
| 11 | import isArray from 'shared/isArray'; |
| 12 | |
| 13 | function captureAssertion(fn) { |
| 14 | // Trick to use a Jest matcher inside another Jest matcher. `fn` contains an |
| 15 | // assertion; if it throws, we capture the error and return it, so the stack |
| 16 | // trace presented to the user points to the original assertion in the |
| 17 | // test file. |
| 18 | try { |
| 19 | fn(); |
| 20 | } catch (error) { |
| 21 | return { |
| 22 | pass: false, |
| 23 | message: () => error.message, |
| 24 | }; |
| 25 | } |
| 26 | return {pass: true}; |
| 27 | } |
| 28 | |
| 29 | function assertYieldsWereCleared(root) { |
| 30 | const Scheduler = root._Scheduler; |
no test coverage detected