I donβt think I understood that.
What hansolo said, I thought, but when I tried it, it did not work.
The problem is that I am using an isolated module. This leads to the fact that any function is not mocked to be part of the coverage.
var es = require('event-stream'); var main = SandboxedModule.require('../main', { requires: { 'gulp-s3': gulpS3, 'knox': faux, 'event-stream': es } });
By performing this pseudo-fake test. We can maintain exclusivity only for our own file, not "event-stream".
source share