Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cucumber Testing requires manual changes to work in Git Bash #156

Closed
2 tasks
ms14981 opened this issue Jan 31, 2023 · 2 comments
Closed
2 tasks

Cucumber Testing requires manual changes to work in Git Bash #156

ms14981 opened this issue Jan 31, 2023 · 2 comments

Comments

@ms14981
Copy link
Contributor

ms14981 commented Jan 31, 2023

This is the section in CONTRIBUTING.md:

If the testing doesn't work you may be using the wrong script-shell configuration in npm. To keep scripts working in both Unix and Windows machines the shell expected in the project is git-bash. To change your shell type you can run the command below, changing the file location if you have your git-bash executable is in a different location:

npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"

For example, in openapi-forge-javascript package.json has this line:

"test:generators": "\"./node_modules/.bin/cucumber-js\" -p generators",

This doesn't in Git Bash out of the box. We could use https://www.npmjs.com/package/cross-env so the line above becomes:

"test:generators": "cross-env-shell ./node_modules/.bin/cucumber-js -p generators",
  • Fix for JS generator
  • Fix for TS generator

Not needed for C#, the command works in a different way.

@ColinEberhardt
Copy link
Collaborator

Thanks for raising @ms14981 - see my comment here:

ScottLogic/openapi-forge-javascript#11 (comment)

It would be good to understand a bit more about this issue before merging these changes. Perhaps one to discuss tomorrow?

@ms14981
Copy link
Contributor Author

ms14981 commented Feb 2, 2023

Resolved

@ms14981 ms14981 closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants