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

Controlling which domains are recorded #17

Open
djake opened this issue Jan 24, 2021 · 0 comments
Open

Controlling which domains are recorded #17

djake opened this issue Jan 24, 2021 · 0 comments

Comments

@djake
Copy link

djake commented Jan 24, 2021

I am using Ava to test an api (with supertest), and perform some configuration with docker (via dockerode). I don't want ava-playback to concern itself with the local loopback interface and/or my local docker server. Is it possible to specify (or exclude) certain hosts from record/playback?

nock does allow this, e.g.:

A common use case when testing local endpoints would be to disable all but localhost, then add in additional nocks for external requests:

nock.disableNetConnect()
// Allow localhost connections so we can test local routes and mock servers.
nock.enableNetConnect('127.0.0.1')

https://github.com/nock/nock#enabling-requests

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