-
Notifications
You must be signed in to change notification settings - Fork 0
/
cypress.config.ts
38 lines (32 loc) · 966 Bytes
/
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
import { defineConfig } from "cypress";
import * as findWebpack from 'find-webpack';
import webpackPreprocessor from '@cypress/webpack-preprocessor'
const webpackOptions = findWebpack.getWebpackOptions();
const options = {
webpackOptions,
watchOptions: {},
};
console.log(webpackOptions)
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
findWebpack.cleanForCypress(webpackOptions, options);
on('file:preprocessor', webpackPreprocessor(options));
},
baseUrl: 'http://localhost:3000',
specPattern: 'cypress/**/*.cy.{js,jsx,ts,tsx}',
},
component: {
setupNodeEvents(on, config){
findWebpack.cleanForCypress(webpackOptions,options);
on('file:preprocessor', webpackPreprocessor(options));
},
devServer: {
framework: 'next',
bundler: 'webpack',
},
specPattern: 'cypress/**/*.cy.{js,jsx,ts,tsx}',
},
video: false,
});