Skip to content

Commit

Permalink
Expose exports alias for tests. Fix #46
Browse files Browse the repository at this point in the history
Signed-off-by: Kaustav Das Modak <[email protected]>
  • Loading branch information
Kaustav Das Modak committed Jun 21, 2016
1 parent 6e2ff62 commit d112619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/req-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var reqman = function (filepath, root) {
var req = new Req(filepath, root);
return {
mod: req.Module,
exports: req.Module.exports || {},
fn: (function (req) {
return function (modname) {
return req.load(modname);
Expand Down
1 change: 1 addition & 0 deletions src/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ VM.prototype.contextify = function (filePath, root) {
console: console,
require: self.require.fn,
module: self.require.mod,
exports: self.require.exports,
process: process,
gauge: global.gauge,
setTimeout: setTimeout,
Expand Down

0 comments on commit d112619

Please sign in to comment.