require-hijack
Version: 
Hijack node require calls, with support for hijacking the entire module itself rather than only its properties. Handy for unit testing and mocking require calls in sub modules!
17 lines (13 loc) • 299 B
JavaScript
/**
 * Global test dependencies
 */
chai = require('chai');
sinon = require('sinon');
sinonChai = require("sinon-chai");
should = chai.should();
expect = chai.expect;
/**
 * Configure use of sinon chai for chai-style sinon assertions
 */
chai.use(sinonChai);
requireHijack = require('../index');