ava-playback
ava-playback copied to clipboard
Controlling which domains are recorded
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