-
-
Save mateodelnorte/5602304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { test: 2 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dep2 = require('./dep2'), | |
dep3 = require('./dep3'); | |
module.exports.one = { test: 1 }; | |
module.exports.two = dep2; | |
module.exports.three = dep3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { test: 3 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mr = require('mockrequire'); | |
var dep = mr('./dep', { | |
'./dep2': { test: 3 } | |
}); | |
console.log(dep.one); | |
console.log(dep.two); | |
console.log(dep.three); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment