Skip to content

[nock] Add Promise based Nock Back types#24808

Merged
mhegazy merged 2 commits intoDefinitelyTyped:masterfrom
edorivai:patch-2
Apr 9, 2018
Merged

[nock] Add Promise based Nock Back types#24808
mhegazy merged 2 commits intoDefinitelyTyped:masterfrom
edorivai:patch-2

Conversation

@edorivai
Copy link
Copy Markdown
Contributor

@edorivai edorivai commented Apr 8, 2018

Documentation:
https://github.com/node-nock/nock#nock-back

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/node-nock/nock#nock-back
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

Relevant snippet from docs:

return nockBack('promisedFixture.json')
  .then(({nockDone, context}) => {
    //  do your tests returning a promise and chain it with
    //  `.then(nockDone);`
  });
});

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 8, 2018

@edorivai Thank you for submitting this PR!

🔔 @bonnici @horiuchi @afharo @mastermatt @damour - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

Copy link
Copy Markdown
Contributor

@mastermatt mastermatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add usage to nock-tests.ts please?
I would recommend starting with the snippet you included in the PR desc then show usages of the props on the NockBackContext instance.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Apr 9, 2018
@typescript-bot
Copy link
Copy Markdown
Contributor

@edorivai One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Apr 9, 2018
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @mastermatt - Thanks for your review of this PR! Can you please look at the new code and update your review status if appropriate?

@typescript-bot
Copy link
Copy Markdown
Contributor

A definition author has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@mhegazy mhegazy merged commit 4fec28a into DefinitelyTyped:master Apr 9, 2018
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.

4 participants