Skip to content

Commit 90461f5

Browse files
committed
test(stepdefinitionpath): added the relevant mocks back
1 parent 6dff207 commit 90461f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/stepDefinitionPath.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe("load path from step definitions", () => {
1919
getConfig.mockReturnValue({
2020
nonGlobalStepDefinitions: true
2121
});
22+
fs.existsSync.mockReturnValue(false);
2223

2324
const errorMessage = `We've tried to resolve your step definitions at ${defaultNonGlobalStepDefinitionsPath}, but that doesn't seem to exist. As of version 2.0.0 it's required to set step_definitions in your cypress-cucumber-preprocessor configuration. Look for nonGlobalStepDefinitions and add stepDefinitions right next to it. It should match your cypress configuration has set for integrationFolder. We no longer rely on getting information from that file as it was unreliable and problematic across Linux/MacOS/Windows especially since the config file could have been passed as an argument to cypress.`;
2425
expect(stepDefinitionPath).throw(errorMessage);
@@ -30,6 +31,7 @@ describe("load path from step definitions", () => {
3031
nonGlobalStepDefinitions: true,
3132
stepDefinitions
3233
});
34+
fs.existsSync.mockReturnValue(false);
3335

3436
const errorMessage = `We've tried to resolve your step definitions at ${stepDefinitions}, but that doesn't seem to exist. As of version 2.0.0 it's required to set step_definitions in your cypress-cucumber-preprocessor configuration. Look for nonGlobalStepDefinitions and add stepDefinitions right next to it. It should match your cypress configuration has set for integrationFolder. We no longer rely on getting information from that file as it was unreliable and problematic across Linux/MacOS/Windows especially since the config file could have been passed as an argument to cypress.`;
3537
expect(stepDefinitionPath).throw(errorMessage);

0 commit comments

Comments
 (0)