faux-jax
faux-jax copied to clipboard
faux-jax 5.0.6 breaking change?
I get some breaking tests since faux-jax 5.0.6 (they don't happen with 5.0.1 to 5.0.5).
"after all" hook: Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
Maybe because the update of the mitm dependency? There is something like this in taht test:
function setupFauxJax() {
fauxJax.install();
// https://github.com/moll/node-mitm#bypassing-interception
fauxJax._mitm.on('connect', function trapSomeRequests(socket, opts) {
if (['some.host', 'other.host']
.indexOf(opts.host) !== -1) {
// intercept
return null;
}
socket.bypass();
});
}
called here in the tests:
beforeEach(() => {
setupFauxJax();
});
afterEach(() => {
fauxJax.restore();
});
The only thing I can tell you is that in between we upgraded to the latest mitm. If you can dig this that's be great. Thanks!