forked from HHS/TANF-app
-
Notifications
You must be signed in to change notification settings - Fork 4
/
cypress.config.js
44 lines (38 loc) · 1.08 KB
/
cypress.config.js
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
const { defineConfig } = require('cypress')
const webpack = require('@cypress/webpack-preprocessor')
const preprocessor = require('@badeball/cypress-cucumber-preprocessor')
module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:3000',
specPattern: '**/*.feature',
env: {
apiUrl: 'http://localhost:3000/v1',
adminUrl: 'http://localhost:3000/admin',
cypressToken: 'local-cypress-token',
},
async setupNodeEvents(on, config) {
// implement node event listeners here
await preprocessor.addCucumberPreprocessorPlugin(on, config)
const webpackOptions = {
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.feature$/,
use: [
{
loader: '@badeball/cypress-cucumber-preprocessor/webpack',
options: config,
},
],
},
],
},
}
on('file:preprocessor', webpack({ webpackOptions }))
return config
},
},
})