File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed
Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -186,3 +186,32 @@ Feature: diagnostics
186186 - 'a step' (cypress/support/step_definitions/steps.js:2)
187187 - /a step/ (cypress/support/step_definitions/steps.js:3)
188188 """
189+
190+ Scenario : module package
191+ Given a file named "package.json" with:
192+ """
193+ {
194+ "type": "module"
195+ }
196+ """
197+ And a file named "cypress/e2e/a.feature" with:
198+ """
199+ Feature: a feature name
200+ Scenario: a scenario name
201+ Given a step
202+ """
203+ And a file named "cypress/support/step_definitions/steps.js" with:
204+ """
205+ import { Given } from "@badeball/cypress-cucumber-preprocessor";
206+ Given("a step", function() {});
207+ """
208+ When I run diagnostics
209+ Then the output should contain
210+ """
211+ ┌────────────────┬─────────────────────────────────────────────┐
212+ │ Pattern / Text │ Location │
213+ ├────────────────┼─────────────────────────────────────────────┤
214+ │ 'a step' │ cypress/support/step_definitions/steps.js:2 │
215+ │ a step │ cypress/e2e/a.feature:3 │
216+ └────────────────┴─────────────────────────────────────────────┘
217+ """
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export async function diagnose(configuration: {
122122
123123 const outputFileName = path . join (
124124 configuration . cypress . projectRoot ,
125- ".output-" + randomPart + ".js "
125+ ".output-" + randomPart + ".cjs "
126126 ) ;
127127
128128 let registry : Registry ;
@@ -150,7 +150,7 @@ export async function diagnose(configuration: {
150150 }
151151
152152 throw new Error (
153- `Failed to compile steø definitions of ${ testFile } , with errors shown above...`
153+ `Failed to compile step definitions of ${ testFile } , with errors shown above...`
154154 ) ;
155155 }
156156
You can’t perform that action at this time.
0 commit comments