Skip to content

Commit

Permalink
Fixed options for vm for older node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
SwinX committed Aug 24, 2015
1 parent 4cb8bc5 commit 0d6394f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/lib/utils/deprecate.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ describe('deprecate', function () {
});

it('should print correct filename for delayed messages', function () {
var contents = 'var deprecate = require("' + deprecatePath + '"); ' +
'deprecate({ module: "test_module" });';
var context = vm.createContext({ 'require': require });
var contents = 'var deprecate = require(path); deprecate({ module: "test_module" });';
var context = vm.createContext({ require: require, path: deprecatePath });

vm.runInContext(contents, context, { filename: '/test_module.js' });
vm.runInContext(contents, context, '/test_module.js');
deprecate.initialize();

Logger.prototype.logWarningAction
Expand Down

0 comments on commit 0d6394f

Please sign in to comment.