Skip to content

Commit

Permalink
test: pass Uint8Array into vm context for buffer v5
Browse files Browse the repository at this point in the history
buffer v5 requires Uint8Array to be defined. apparently it is
not defined by default in node v0.10.
  • Loading branch information
feross committed Jan 25, 2017
1 parent ae33350 commit 4f5d93b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/double_buffer.js
Expand Up @@ -9,6 +9,6 @@ test('double buffer', function (t) {
b.require('buffer');
b.bundle(function (err, src) {
if (err) return t.fail(err);
vm.runInNewContext(src, { t: t });
vm.runInNewContext(src, { t: t, Uint8Array: Uint8Array });
});
});
2 changes: 1 addition & 1 deletion test/global.js
Expand Up @@ -26,7 +26,7 @@ test('__filename and __dirname with insertGlobals: true', function (t) {
});
b.require(__dirname + '/global/filename.js', { expose: 'x' });
b.bundle(function (err, src) {
var c = {};
var c = { Uint8Array: Uint8Array };
c.self = c;
vm.runInNewContext(src, c);
var x = c.require('x');
Expand Down
2 changes: 1 addition & 1 deletion test/leak.js
Expand Up @@ -52,6 +52,6 @@ test('leaking information about system paths (Buffer)', function (t) {
t.equal(src.indexOf(dirstring), -1, 'temp directory visible');
t.equal(src.indexOf(process.cwd()), -1, 'cwd directory visible');
t.equal(src.indexOf('/home'), -1, 'home directory visible');
vm.runInNewContext(src, { t: t, setTimeout: setTimeout });
vm.runInNewContext(src, { t: t, setTimeout: setTimeout, Uint8Array: Uint8Array });
});
});

0 comments on commit 4f5d93b

Please sign in to comment.