Skip to content

Commit

Permalink
dev: use cypress preprocessor (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
silviuaavram authored Sep 23, 2022
1 parent c188cc1 commit 78ce9e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const customPreset = api => {
const plugins = [
require.resolve('babel-plugin-dynamic-import-node'),
['no-side-effect-class-properties'],
['@babel/plugin-proposal-private-property-in-object', {loose: true}], // cypress warning because loose is false in preset-env
['@babel/plugin-proposal-private-methods', {loose: true}], // cypress warning because loose is false in preset-env
...evaluatedPreset.plugins,
]
return {
Expand Down
4 changes: 4 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
const webpackPreprocessor = require('@cypress/webpack-preprocessor')
const {defineConfig} = require('cypress')

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:6006',
video: false,
setupNodeEvents(on) {
on('file:preprocessor', webpackPreprocessor())
},
},
})
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
},
"devDependencies": {
"@babel/helpers": "^7.14.8",
"@cypress/webpack-preprocessor": "^5.12.2",
"@docusaurus/core": "^2.0.1",
"@docusaurus/module-type-aliases": "^2.0.1",
"@docusaurus/preset-classic": "^2.0.1",
Expand Down

0 comments on commit 78ce9e9

Please sign in to comment.