-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcypress.config.ts
56 lines (52 loc) · 1.33 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { defineConfig } from "cypress";
export default defineConfig({
defaultCommandTimeout: 16000,
pageLoadTimeout: 60000,
projectId: "5z1jcc",
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);
},
baseUrl: "http://localhost:3000",
specPattern: "cypress/e2e/**/*.spec.{js,ts,jsx,tsx}",
},
component: {
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config);
return config;
},
specPattern: "cypress/component/**/*.test.{js,ts,jsx,tsx}",
devServer: {
framework: "next",
bundler: "webpack",
webpackConfig: {
mode: 'development',
devtool: false,
module: {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['next/babel'],
plugins: ['istanbul',],
},
},
},
],
},
}
},
},
env: {
codeCoverage: {
url: "http://localhost:3000/api/__coverage__"
}
}
});