Closed
Description
Something unique about Cypress is that it's not just a test framework, but also offers a nice development environment. The plugin for Cypress currently comes with an e2e:open
script for running the Cypress client:
"e2e:open": "vue-cli-service e2e:open"
But it serves in production mode, which I only prefer when debugging the very rare production-only issue. This also defeats what I feel is the primary purpose of the client: to facilitate development, whether you're writing new tests alongside or not.
For that reason, I've replaced it with a dev:e2e
script in vue-enterprise-boilerplate:
"dev:e2e": "vue-cli-service e2e:open --mode=development",
A few advantages I'm thinking of:
- The emphasis on development (
dev:e2e
instead ofe2e:open
ore2e:dev
) highlights it as a vital tool in the development process. - Running the dev server in development mode means that when something goes wrong, users will get more useful errors from Vue and potentially other libraries. This would make debugging failing tests a lot easier.
What do you think? Would it be appropriate to replace e2e:open
with a dev:e2e
?