My attempt to create a testing fixture to simplify testing has failed, because the fixture would need to use proxyquire, and the fixture would need to be proxyquired into the test. This does not appear to work.
For example, the following will fail:
a.js
const b = require('b');
module.exports = {b};
b.js
module.exports = 'failed';
a.fixture.js
const proxyquire = require('proxyquire');
module.exports = proxyquire('./a', {b: 'success'});
a.test.js
const expect = require('expect');
const proxyquire = require('proxyquire');
const a = proxyquire('./a.fixture', {});
describe('test', () => { it('should succeed', done => {
expect(a).to.be.equal('success');
done();
})});