Merge pull request #244 from strongloop/fix/node-0.10-ci
Fix browser tests on Node.js 0.10
This commit is contained in:
commit
cda21ea481
|
@ -63,6 +63,12 @@ function createContext() {
|
||||||
// `window` is used by loopback to detect browser runtime
|
// `window` is used by loopback to detect browser runtime
|
||||||
context.window = context;
|
context.window = context;
|
||||||
|
|
||||||
|
// In Node.js 0.10, the Uint8Array is provided by Node.js glue,
|
||||||
|
// it's not available in the V8 runtime itself
|
||||||
|
if (/^v0\.10/.test(process.version)) {
|
||||||
|
context.Uint8Array = Uint8Array;
|
||||||
|
}
|
||||||
|
|
||||||
return vm.createContext(context);
|
return vm.createContext(context);
|
||||||
}
|
}
|
||||||
exports.createContext = createContext;
|
exports.createContext = createContext;
|
||||||
|
|
Loading…
Reference in New Issue