Skip to content

Commit 4f5d93b

Browse files
committed
test: pass Uint8Array into vm context for buffer v5
buffer v5 requires Uint8Array to be defined. apparently it is not defined by default in node v0.10.
1 parent ae33350 commit 4f5d93b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

test/double_buffer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ test('double buffer', function (t) {
99
b.require('buffer');
1010
b.bundle(function (err, src) {
1111
if (err) return t.fail(err);
12-
vm.runInNewContext(src, { t: t });
12+
vm.runInNewContext(src, { t: t, Uint8Array: Uint8Array });
1313
});
1414
});

test/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test('__filename and __dirname with insertGlobals: true', function (t) {
2626
});
2727
b.require(__dirname + '/global/filename.js', { expose: 'x' });
2828
b.bundle(function (err, src) {
29-
var c = {};
29+
var c = { Uint8Array: Uint8Array };
3030
c.self = c;
3131
vm.runInNewContext(src, c);
3232
var x = c.require('x');

test/leak.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ test('leaking information about system paths (Buffer)', function (t) {
5252
t.equal(src.indexOf(dirstring), -1, 'temp directory visible');
5353
t.equal(src.indexOf(process.cwd()), -1, 'cwd directory visible');
5454
t.equal(src.indexOf('/home'), -1, 'home directory visible');
55-
vm.runInNewContext(src, { t: t, setTimeout: setTimeout });
55+
vm.runInNewContext(src, { t: t, setTimeout: setTimeout, Uint8Array: Uint8Array });
5656
});
5757
});

0 commit comments

Comments
 (0)