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

Strange behaviour using nock and nock-vcr-recorder #11

Open
diegohaz opened this issue Aug 29, 2016 · 2 comments
Open

Strange behaviour using nock and nock-vcr-recorder #11

diegohaz opened this issue Aug 29, 2016 · 2 comments

Comments

@diegohaz
Copy link

diegohaz commented Aug 29, 2016

I'm using nock-vcr-recorder and nock on different test suites, but in the same execution. The first time nock-vcr-recorder runs (or has { mode: 'all' }), subsequent nock('...') fails. It seems like something has not been closed at the first vcr run and it doesn't allow nock to work.

@diegohaz
Copy link
Author

I solve this by adding the following line before using nock:

nock.restore() && nock.isActive() || nock.activate()

@diegohaz
Copy link
Author

diegohaz commented Aug 29, 2016

I reopened because maybe there's a better solution to be implemented inside nock-vcr-recorder.
I've also submitted an issue on nock repo: nock/nock#666

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

1 participant