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

Typescript definitions missing - encodedQueryParams and activeMocks #1514

Closed
tagyoureit opened this issue Apr 28, 2019 · 5 comments
Closed

Comments

@tagyoureit
Copy link

tagyoureit commented Apr 28, 2019

What is the expected behavior?
Typescript will know about these parameters.

What is the actual behavior?
They are missing from the Typescript files

Possible solution
Add them. :)

How to reproduce the issue
nock.activeMocks() is missing => add export function activeMocks(): string[]; to the nock namespace.
nock( 'https://api.github.com' , {"encodedQueryParams":true}) => add encodedQueryParams: boolean to the Options interface.

Runkit: Example link
n/a
Having problem producing a test case? Try and ask the community for help. If the test case cannot be reproduced, the Nock community might not be able to help you.
n/a
Does the bug have a test case?
n/a
Versions

Software Version(s)
Nock 10.0.6
Node any
@types/nock 10.0.0
@gr2m
Copy link
Member

gr2m commented Apr 28, 2019

We do not maintain @types/nock I’m afraid. Please file an issue at https://github.com/DefinitelyTyped/DefinitelyTyped/issues

@gr2m gr2m closed this as completed Apr 28, 2019
@mastermatt
Copy link
Member

@mastermatt
Copy link
Member

FYI: encodedQueryParams is not documented in the README. Is that an oversight or is it meant to be internal?

@paulmelnikow
Copy link
Member

Yea, it seems like it needs to be public for the recorder to work. If someone wants to open a PR to document it we could make it official.

@tagyoureit
Copy link
Author

tagyoureit commented May 2, 2019

That's exactly how I found it... recorder outputted it as part and then I needed to remove it to make TS happy when adding back the code to my tests. (Although I'm really not sure it was needed or why it was added, but that's a completely different conversation.)

mastermatt added a commit to mastermatt/nock that referenced this issue May 2, 2019
Identified as missing here nock#1514 (comment).

This seems option seems to have been added to better support how the
recorder saves and plays back. But as it is a valid, public option it
should be documented.
mastermatt added a commit to mastermatt/nock that referenced this issue May 2, 2019
Identified as missing here nock#1514 (comment).

This option seems to have been added to better support how the
recorder saves and plays back. But as it is a valid, public option it
should be documented.
gr2m pushed a commit that referenced this issue May 2, 2019
Identified as missing here #1514 (comment).

This option seems to have been added to better support how the
recorder saves and plays back. But as it is a valid, public option it
should be documented.
gr2m pushed a commit that referenced this issue Sep 4, 2019
Identified as missing here #1514 (comment).

This option seems to have been added to better support how the
recorder saves and plays back. But as it is a valid, public option it
should be documented.
gr2m pushed a commit that referenced this issue Sep 4, 2019
Identified as missing here #1514 (comment).

This option seems to have been added to better support how the
recorder saves and plays back. But as it is a valid, public option it
should be documented.
gr2m pushed a commit that referenced this issue Sep 5, 2019
Identified as missing here #1514 (comment).

This option seems to have been added to better support how the
recorder saves and plays back. But as it is a valid, public option it
should be documented.
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

4 participants