Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

211
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda