Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

IE<=8 no [].reduce, so use 'utils.reduce' instead

wsw0565fac49e41
diff --git a/lib/runner.js b/lib/runner.js
index 67ecabe0..c648a364 100644
--- a/lib/runner.js
+++ b/lib/runner.js
@@ -806,7 +806,8 @@ function filterLeaks(ok, globals) {
*/
function extraGlobals() {
if (typeof process === 'object' && typeof process.version === 'string') {
- var nodeVersion = process.version.split('.').reduce(function(a, v) {
+ var parts = process.version.split('.');
+ var nodeVersion = utils.reduce(parts, function(a, v) {
return a << 8 | v;
});