Merge pull request #244 from strongloop/fix/node-0.10-ci

Fix browser tests on Node.js 0.10
This commit is contained in:
Miroslav Bajtoš 2017-03-24 12:22:09 +01:00 committed by GitHub
commit cda21ea481
1 changed files with 6 additions and 0 deletions

View File

@ -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;