Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

faux-jax 5.0.6 breaking change? #26

Open
yanndinendal opened this issue Feb 9, 2017 · 1 comment
Open

faux-jax 5.0.6 breaking change? #26

yanndinendal opened this issue Feb 9, 2017 · 1 comment

Comments

@yanndinendal
Copy link

yanndinendal commented Feb 9, 2017

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();
  });
@yanndinendal yanndinendal changed the title faux-jax 5.0.6 breaks :set nu! faux-jax 5.0.6 breaking change? Feb 9, 2017
@vvo
Copy link
Contributor

vvo commented Feb 10, 2017

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!

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