Skip to content

Commit 77ddc7a

Browse files
adding and updating configs
1 parent 9a35e9c commit 77ddc7a

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

Diff for: cypress.config.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
import { defineConfig } from 'cypress';
2+
import customViteConfig from './vite.cypress.config.ts';
23

34
export default defineConfig({
45
e2e: {
56
setupNodeEvents(on, config) {
6-
// implement node event listeners here
7+
config.env = {
8+
...process.env,
9+
...config.env,
10+
};
11+
return config;
712
},
13+
specPattern: './src/**/*.spec.cy.{js,jsx,ts,tsx}',
814
},
915

1016
component: {
1117
devServer: {
1218
bundler: 'vite',
1319
framework: 'vue',
20+
viteConfig: customViteConfig,
1421
},
22+
specPattern: './src/**/*.cy.{js,jsx,ts,tsx}',
1523
viewportHeight: 800,
1624
viewportWidth: 1920,
1725
},

Diff for: tsconfig.cypress.json

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"baseUrl": ".",
5+
"types": [
6+
"cypress"
7+
],
8+
"typeRoots": [
9+
"./cypress/types/",
10+
],
11+
"paths": {
12+
"@/*": [
13+
"src/*"
14+
],
15+
"@cypress/*": [
16+
"./cypress/*"
17+
]
18+
}
19+
},
20+
"include": [
21+
"src/**/*.cy.ts",
22+
"src/**/*.cy.tsx",
23+
"cypress/**/*.ts"
24+
]
25+
}

0 commit comments

Comments
 (0)