File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed
browserify/cypress/plugins Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change 11import * as browserify from "@cypress/browserify-preprocessor" ;
2+ import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor" ;
23import { preprocessor } from "@badeball/cypress-cucumber-preprocessor/browserify" ;
34
4- export default (
5+ export default async (
56 on : Cypress . PluginEvents ,
67 config : Cypress . PluginConfigOptions
7- ) : void => {
8+ ) : Promise < Cypress . PluginConfigOptions > => {
9+ await addCucumberPreprocessorPlugin ( on , config ) ;
10+
811 on (
912 "file:preprocessor" ,
1013 preprocessor ( config , {
1114 ...browserify . defaultOptions ,
1215 typescript : require . resolve ( "typescript" ) ,
1316 } )
1417 ) ;
18+
19+ // Make sure to return the config object as it might have been modified by the plugin.
20+ return config ;
1521} ;
Original file line number Diff line number Diff line change 11import * as createBundler from "@bahmutov/cypress-esbuild-preprocessor" ;
2+ import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor" ;
23import { createEsbuildPlugin } from "@badeball/cypress-cucumber-preprocessor/esbuild" ;
34
4- export default (
5+ export default async (
56 on : Cypress . PluginEvents ,
67 config : Cypress . PluginConfigOptions
7- ) : void => {
8+ ) : Promise < Cypress . PluginConfigOptions > => {
9+ await addCucumberPreprocessorPlugin ( on , config ) ;
10+
811 on (
912 "file:preprocessor" ,
1013 createBundler ( {
1114 plugins : [ createEsbuildPlugin ( config ) ] ,
1215 } )
1316 ) ;
17+
18+ // Make sure to return the config object as it might have been modified by the plugin.
19+ return config ;
1420} ;
Original file line number Diff line number Diff line change 11import * as webpack from "@cypress/webpack-preprocessor" ;
2+ import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor" ;
23
3- export default (
4+ export default async (
45 on : Cypress . PluginEvents ,
56 config : Cypress . PluginConfigOptions
6- ) : void => {
7+ ) : Promise < Cypress . PluginConfigOptions > => {
8+ await addCucumberPreprocessorPlugin ( on , config ) ;
9+
710 on (
811 "file:preprocessor" ,
912 webpack ( {
@@ -36,4 +39,7 @@ export default (
3639 } ,
3740 } )
3841 ) ;
42+
43+ // Make sure to return the config object as it might have been modified by the plugin.
44+ return config ;
3945} ;
You can’t perform that action at this time.
0 commit comments