-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Smoother onboarding for Windows developers (#1863)
* Add a warning for Windows developers The tests won't work if you don't have "Developer Mode" enabled. See #1852 Co-authored-by: Aurelien Reeves <[email protected]> * Explain about Developer Mode in contributing guide * Use cross-platform command for copying files * Update changelog * No need to npx in a node script Co-authored-by: Aurelien Reeves <[email protected]>
- Loading branch information
1 parent
26ef112
commit 49a51f9
Showing
6 changed files
with
135 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
features/support/warn_user_about_enabling_developer_mode.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { reindent } from 'reindent-template-literals' | ||
import colors from 'colors/safe' | ||
|
||
export function warnUserAboutEnablingDeveloperMode(error: any): void { | ||
if (!(error?.code === 'EPERM')) { | ||
throw error | ||
} | ||
if (!(process.platform === 'win32')) { | ||
throw error | ||
} | ||
|
||
console.error( | ||
colors.red( | ||
reindent(` | ||
Error: Unable to run feature tests! | ||
You need to enable Developer Mode in Windows to run Cucumber JS's feature tests. | ||
See this link for more info: | ||
https://docs.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging | ||
`) | ||
) | ||
) | ||
process.exit(1) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters