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

349
Visualizações
Disable generation of cypress folders when running tests

I'm trying to do a bunch of unit tests with Cypress. Here's the npm script that runs them:

cypress run --project tests/unit/ --headless

When I run them, it generates the typical plugin/support/videos folders, but I don't need them. Is there any flag that disables the generation of these 3 folders when running the tests?

Thanks!

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Just add these generated reports to a .gitignore file in the project's root like so:

# Cypress generated files #
######################
cypress.env.json
cypress.meta.json
cypress/logs/
cypress/videos/*
cypress/screenshots/*
cypress/integration/_generated/*
cypress/data/migration/generated/*.csv
cypress/fixtures/example.json
cypress/build/*

Now, these files will never be version-controlled.

You can also disable video recording with proper configuration in your cypress.json file like so: "videoRecording": false.

You can also do it with CLI by overriding your cypress.json.

Currently, there's no way to disable the generation of those files. However, you could remove them by when launching Cypress with an npm script like so:

"clean:launch:test": "rm -rf /cypress/movies && rm -rf /cypress/screenshots && cypress run --project tests/unit/ --headless"

Then you can run it like so: npm run clean:launch:test. It should remove those folders & launch Cypress's unit tests.

I suggest just adding them to .gitignore or configuring Cypress to trash them before each run. You can read about it here.

cypress.json file:

trashAssetsBeforeRuns: true
over 4 years ago · Santiago Trujillo Relatório

0

Video recording can be turned off entirely by setting video to false from within your configuration.

"videoRecording": false

https://docs.cypress.io/guides/guides/screenshots-and-videos#Videos

over 4 years ago · Santiago Trujillo 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