Skip to content

Commit

Permalink
chore: clean up test running
Browse files Browse the repository at this point in the history
 - update start-server-and-test
   - v2 doesn't work for some reason and it looks abandoned
 - add an optional runner for cypress open using start-server-and-test
  • Loading branch information
yanfali committed Aug 16, 2024
1 parent 47fa700 commit 9dbb486
Show file tree
Hide file tree
Showing 3 changed files with 499 additions and 1,385 deletions.
15 changes: 9 additions & 6 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ module.exports = defineConfig({
chromeWebSecurity: false,
video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config);
devServer: {
framework: 'vue',
bundler: 'vite'
},
baseUrl: 'http://localhost:5173/',
specPattern: 'tests/integration/**/*.spec.js',
supportFile: false
},
component: {
setupNodeEvents(on, config) {},
specPattern: 'src/**/*.spec.js'
devServer: {
framework: 'vue',
bundler: 'vite'
},
specPattern: 'src/**/*.spec.js',
supportFile: false
}
});
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"json:check": "node scripts/json/ajv.js public/keymaps",
"test:cypress": "cypress run",
"test:cypress:open": "cypress open",
"test:cypress:ci": "start-server-and-test dev http-get://localhost:5173 test:cypress",
"test:cypress:open:interactive": "start-server-and-test dev http://localhost:5173 test:cypress:open",
"test:cypress:ci": "start-server-and-test dev http://localhost:5173 test:cypress",
"prepare": "husky install"
},
"dependencies": {
Expand All @@ -41,8 +42,6 @@
"vuex": "^3.0.1"
},
"devDependencies": {
"@cypress/vite-dev-server": "3",
"@cypress/vue": "3",
"@mixer/parallel-prettier": "^2.0.2",
"@types/lodash": "^4.14.178",
"@vitejs/plugin-vue": "4",
Expand All @@ -67,7 +66,7 @@
"sass": "^1.54.5",
"serialize-javascript": "^3.1.0",
"simplecc-wasm": "^0.1.4",
"start-server-and-test": "^1.10.0",
"start-server-and-test": "1",
"tar": "^6.2.1",
"vite": "4",
"vite-plugin-vue2": "^1.9.2",
Expand Down
Loading

0 comments on commit 9dbb486

Please sign in to comment.