-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcypress.config.ts
32 lines (31 loc) · 1.14 KB
/
cypress.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { defineConfig } from 'cypress'
import {createEsbuildDevServer} from 'cypress-devserver-esbuild'
import * as alias from 'esbuild-plugin-alias'
export default defineConfig({
e2e: {},
component: {
devServer: createEsbuildDevServer({
logLevel: 'info',
outdir: 'dist/',
bundle: true,
sourcemap: true,
target: 'chrome90',
jsxFactory: 'h',
jsxFragment: 'Fragment',
inject: ['./build/helmet.js'],
plugins: [
/* @ts-expect-error-next-line */
alias({
react: require.resolve('./node_modules/preact/compat'),
'react-dom/test-utils': require.resolve('./node_modules/preact/test-utils'),
'react-dom': require.resolve('./node_modules/preact/compat'),
'react/jsx-runtime': require.resolve('./node_modules/preact/jsx-runtime')
})
]
}),
supportFile: './cypress/support/component.tsx',
specPattern: './cypress/component/**/*.spec.tsx'
},
'chromeWebSecurity': false,
video: false
})