Converted test.sh bash script to Javascript
What this PR does
This PR converts the test.sh bash script file to javascript making it the platform agnostic. This PR is part of a series of PRs trying to solve issue #174
Changes you made
Converted the bash commands into it's closely equivalent JS commands using shellJS package.
Screenshot/ CodeSnippet Not required
Test Configuration:
Tried to test locally for various codegens by running npm test <codegen-name> and comparing the result obtained with that generated from the similar bash script.
Follow up Not required
Thanks for contributing! ❤️
@umeshp7 Please review.
@umeshp7 @shreys7 Can you please restart the build for this PR, as it failed because of some internal issue with shellJS which I think can be passed by trying for one more time.
I tried running it twice, but it failed with the same errors @sastava007
@shreys7 Any hint, on what I might be doing wrong? I'm not able to figure out.
@sastava007 You could try removing shell.config.fatal=true; This is preventing from the console.log(commandOut.stderr) to be printed.
Once you do that you will know what is the error.
Warning: Could not find any test files matching pattern: ./test/codegen/structure.test.js
Warning: Could not find any test files matching pattern: curl
@sastava007
I have tried running this locally. There are issues while running npm run test.
Can you address them?
@umeshp7 Okay, I'll try to fix them once I complete the draft for my proposal.
@shreys7 Any hint, on what I might be doing wrong? I'm not able to figure out.
This might be a problem with shelljs. Checkout this. Try updating to shelljs 0.8.2 or above, currently latest stable release is 0.8.4. @sastava007
This might be a problem with shelljs. Checkout this. Try updating to shelljs 0.8.2 or above, currently latest stable release is 0.8.4. @sastava007
@someshkoli Yeah, I've figured it out. I will update and submit by weekend.