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

86
Visualizações
How to use cypress plugins in version 10

When using htmlvalidate with cypress (version 9 or less) you can simply install via cypress/plugins/index.js::

const htmlvalidate = require("cypress-html-validate/dist/plugin");

module.exports = (on) => {
  htmlvalidate.install(on);
}; 

However plugins was depreciated in cypress version 10 and you need to use config.

However it's not clear to me how to enable htmlvalidator in this manner. E.g:

const {defineConfig} = require('cypress');
const {htmlvalidate} = require("cypress-html-validate/dist/plugin");

module.exports = defineConfig({
    projectId: '4dofbo',
    e2e: {

        setupNodeEvents(on, config) {
            on('task', {
                // WHAT GOES HERE?
            });
        },
    },
});
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You don't need to utilize any on('task') function, and instead can use the function in setupNodeEvents.

Directly from the cypress-html-validate documentation

export default defineConfig({
  e2e: {
    setupNodeEvents(on) {
      htmlvalidate.install(on);
    },
  },
});
about 4 years ago · Juan Pablo Isaza Relatório
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