Skip to content

Added ES6 feature support to NodeJS-Request codegen #180

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

Merged
merged 3 commits into from
Mar 3, 2020

Conversation

sastava007
Copy link
Contributor

@sastava007 sastava007 commented Feb 27, 2020

What it does
It allows the user to generate the code snippet for NodeJS Request in ES6 format.
This is in response to issue #115 requested by one of the users.

Changes I made

  • Registered a new parameter ES6_enabled in options() which allows the user to toggle between whether codegen generates snippet with ES6 features or not.

  • By default ES6_enabled is set to false

  • Also added the new created option parameter in structure.test.js file to register it as a valid option id.

  • Added unit tests to verify the generated snippets.

Follow Up
This PR is first in the series of upcoming PRs which will add the feature of generating code snippet in ES6 notation with NodeJS.

@sastava007
Copy link
Contributor Author

sastava007 commented Feb 27, 2020

@shreys7 @umeshp7
I have made all the changes as you said in your last review, hope it's fine now.

@sastava007
Copy link
Contributor Author

@shreys7 Have updated as you said, once this one gets accepted for request I'll fix the native and unirest with the same approach.

@sastava007
Copy link
Contributor Author

@umeshp7 Can you please review this?

@umeshp7
Copy link
Contributor

umeshp7 commented Mar 2, 2020

We'll need an extra set of newman tests, with this option enabled true. We need to make sure the snippet generated is runnable.

@sastava007
Copy link
Contributor Author

@umeshp7 I have added a new block inside the main mocha suite with ES6_enabled : true, please have a look.

@umeshp7 umeshp7 mentioned this pull request Mar 2, 2020
@shreys7
Copy link
Member

shreys7 commented Mar 3, 2020

@sastava007 Merging this, you can start working on native and unirest. Thanks for the contribution.

@shreys7 shreys7 merged commit d0e40c2 into postmanlabs:develop Mar 3, 2020
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

Successfully merging this pull request may close these issues.

3 participants