Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

234
Visualizações
Cypress: sending report stats to discord/slack

I have a framework ready in cypress, now I want my execution stats to be posted to discord or slack. Now to do that I have written a after:run method in plugin/index.js and I am getting the stats. I am getting stuck not when I am trying to send the stats to slack.

/// <reference types="cypress" />

module.exports = (on, config) => {
on('after:run', (results) => {if (results) {

    abc = results.totalPassed, 'out of all tests', results.totalTests, 'passed'
    //console.log(results.totalPassed, 'out of all tests', results.totalTests, 'passed')
     got.post(
      'SLACK WEBHOOK IRL',
      { body: {content: abc}, json: true }
     );
  }})
}

I tried axios as well but I am constantly getting axios/got not defined. and if I add an Import statement then I am getting an error message saying Import cannot be outside of module.

Not sure what is the currect path here to get this activity done.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda