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

Persisting scopes don't actually persist unless defined twice #83

Closed
Tivoli opened this issue Dec 7, 2012 · 2 comments
Closed

Persisting scopes don't actually persist unless defined twice #83

Tivoli opened this issue Dec 7, 2012 · 2 comments

Comments

@Tivoli
Copy link

Tivoli commented Dec 7, 2012

For example I have 3 calls to the Twitter API for verify_credentials.json

nock('https://api.twitter.com')
  .persist()
  .get('/1/account/verify_credentials.json')
  .replyWithFile(200, __dirname + '/twitter.json');

With the above the first call is correctly intercepted and the other 2 are not intercepted. But if I add the call a second time like so

nock('https://api.twitter.com')
  .persist()
  .get('/1/account/verify_credentials.json')
  .replyWithFile(200, __dirname + '/twitter.json')
  .get('/1/account/verify_credentials.json')
  .replyWithFile(200, __dirname + '/twitter.json');

Then all 3 calls will be correctly intercepted.

@pgte pgte closed this as completed in 182edf5 Dec 7, 2012
@pgte
Copy link
Member

pgte commented Dec 7, 2012

Fixed in v0.14.2

@lock
Copy link

lock bot commented Sep 14, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants