MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / injectHook

Function injectHook

lib/mocha/asyncWrapper.js:9–20  ·  view source on GitHub ↗
(inject, suite)

Source from the content-addressed store, hash-verified

7import { fireHook } from './hooks.js'
8
9const 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
22function suiteTestFailedHookError(suite, err, hookName) {
23 suite.eachTest(test => {

Callers

nothing calls this directly

Calls 2

injectFunction · 0.85
suiteTestFailedHookErrorFunction · 0.85

Tested by

no test coverage detected