nice-soccer-53564
07/25/2022, 1:56 AMcypress.conf.ts at after:spec
`
No overload matches this call.
The last overload gave the following error.
Argument of type '"after:spec"' is not assignable to parameter of type '"task"'.ts(2769)
This is my snippet for cypress.conf.ts. I'd really appreciate some help here, Not sure if this is a known bug?
e2e: {
setupNodeEvents(on, config) {
on('after:spec', (spec, results) => {
if (results && results.video) {
// Do we have failures for any retry attempts?
const failures = some(results.tests, test => {
return some(test.attempts, { state: 'failed' })
})
if (!failures) {
// delete the video if the spec passed and no tests retried
return deleteSync(results.video)
}
}
})
return require('./cypress/plugins/index.js')(on, config)
},
},