cypress: --no-exit flag causes Cypress to hang after first file in multiple file run

Current behavior:

If cypress run is invoked with the --no-exit flag and the pattern to find specs matches multiple files, cypress will only run the first file and then hang with the message not exiting due to options.exit being false

Desired behavior:

Cypress should run all the matched files before ending the run and not exiting

Steps to reproduce:

Clone https://github.com/cdanielsen/cypress-test-tiny git checkout bug/no-exit-flag-prevents-multiple-file-run npm run test:noexit

Versions

Cypress: 3.0.2 OS: Ubuntu 18 Browser: Chromium

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 18 (8 by maintainers)

Most upvoted comments

@cdanielsen I think you should use the Module API. I’d create a script that requires Cypress and then you can do whatever you want after Cypress exits.

https://on.cypress.io/module-api

@cdanielsen Hi, Can you explain your use case for this? I’m just curious, because the --no-exit was added to allow users to debug a --headed run by allowing you to keep the browser open.