https://cypress.io logo
Thank you so much <@267079522405449739> and <@8757...
# general-chat
n
Thank you so much @adorable-smartphone-87280 and @adventurous-dream-20049 I tried doing this but I'm getting type errors in my
cypress.conf.ts
at
after:spec
Copy code
`
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?
Copy code
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)
    },
  },
2 Views