Error: server closed unexpectedly
-
When I run test:e2e script with yarn, quasar dev command not working, so script broken unexpectedly.
"C:\Program Files\nodejs\node.exe" "C:\Program Files (x86)\Yarn\bin\yarn.js" run test:e2e yarn run v1.22.5 $ cross-env E2E_TEST=true start-test 'quasar dev' http-get://localhost:8080 'cypress open' 1: starting server using command "quasar" and when url "[ 'dev' ]" is responding with HTTP status code 200 2: starting server using command "http-get://localhost:8080" and when url "[ 'cypress' ]" is responding with HTTP status code 200 running tests using command "open" ___ / _ \ _ _ __ _ ___ __ _ _ __ | | | | | | |/ _` / __|/ _` | '__| | |_| | |_| | (_| \__ \ (_| | | \__\_\\__,_|\__,_|___/\__,_|_| Running @quasar/app v2.1.6 Example usage $ quasar <command> <options> Help for a command $ quasar <command> --help $ quasar <command> -h Options --version, -v Print Quasar App CLI version Commands dev, d Start a dev server for your App build, b Build your app for production clean, c Clean all build artifacts new, n Quickly scaffold page/layout/component/... vue file mode, m Add/remove Quasar Modes for your App inspect Inspect generated Webpack config ext, e Manage Quasar App Extensions run, r Run specific command provided by an installed Quasar App Extension describe Describe a Quasar API (component) test, t Run @quasar/testing App Extension command - requires @quasar/testing App Extension to be installed - this is an alias command for convenience purposes info, i Display info about your machine and your App help, h Displays this message If the specified command is not found, then "quasar run" will be executed with the provided arguments. Error: server closed unexpectedly at ChildProcess.onClose (C:\Users\baram204\WebstormProjects\hanhwa-consultant-web\node_modules\start-server-and-test\src\index.js:69:14) at ChildProcess.emit (events.js:315:20) at ChildProcess.cp.emit (C:\Users\baram204\WebstormProjects\hanhwa-consultant-web\node_modules\cross-spawn\lib\enoent.js:34:29) at maybeClose (internal/child_process.js:1048:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Process finished with exit code 1
I installed test packages with below doc.
https://testing.quasar.dev/
https://testing.quasar.dev/packages/e2e-cypress/and my package.json looks fine.
"scripts": { ...... "test:e2e": "cross-env E2E_TEST=true start-test 'quasar dev' http-get://localhost:8080 'cypress open'", "test:e2e:ci": "cross-env E2E_TEST=true start-test 'quasar dev' http-get://localhost:8080 'cypress run'", "test": "echo \"See package.json => scripts for available tests.\" && exit 0", "test:unit": "jest --updateSnapshot", "test:unit:coverage": "jest --coverage", "test:unit:watch": "jest --watch", "test:unit:watchAll": "jest --watchAll", "serve:test:coverage": "quasar serve test/jest/coverage/lcov-report/ --port 8788", "concurrently:dev:jest": "concurrently \"quasar dev\" \"jest --watch\"", "test:unit:ui": "majestic" }, "devDependencies": { ...... "@quasar/quasar-app-extension-testing": "^1.0.0", "@quasar/quasar-app-extension-testing-e2e-cypress": "^2.0.1", "@quasar/quasar-app-extension-testing-unit-jest": "^2.0.0", "eslint-plugin-cypress": "^2.11.1", "eslint-plugin-jest": "^23.8.2", ....
How can i run quasar dev command inside test:e2e script?