(inject, suite)
| 7 | import { fireHook } from './hooks.js' |
| 8 | |
| 9 | const injectHook = function (inject, suite) { |
| 10 | try { |
| 11 | inject() |
| 12 | } catch (err) { |
| 13 | recorder.throw(err) |
| 14 | } |
| 15 | recorder.catch(err => { |
| 16 | suiteTestFailedHookError(suite, err) |
| 17 | throw err |
| 18 | }) |
| 19 | return recorder.promise() |
| 20 | } |
| 21 | |
| 22 | function suiteTestFailedHookError(suite, err, hookName) { |
| 23 | suite.eachTest(test => { |
nothing calls this directly
no test coverage detected