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

Function wireOnFail

lib/plugin/screenshot.js:117–128  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

115}
116
117function wireOnFail(options) {
118 let currentTest = null
119 event.dispatcher.on(event.test.before, test => {
120 currentTest = test
121 })
122 event.dispatcher.on(event.test.failed, (test, _err, hookName) => {
123 if (hookName === 'BeforeSuite' || hookName === 'AfterSuite') return
124 const t = test || currentTest
125 if (!t) return
126 scheduleScreenshot(t, suffix(t, options, 'failed'), options)
127 })
128}
129
130function wireOnTest(options) {
131 event.dispatcher.on(event.test.after, test => {

Callers 1

screenshot.jsFile · 0.85

Calls 2

scheduleScreenshotFunction · 0.85
suffixFunction · 0.85

Tested by

no test coverage detected