Index: test/_common.js |
=================================================================== |
--- a/test/_common.js |
+++ b/test/_common.js |
@@ -423,22 +423,21 @@ exports.setupRandomResult = function() |
{ |
let randomResult = 0.5; |
Object.defineProperty(this, "randomResult", { |
get: () => randomResult, |
set: value => randomResult = value |
}); |
return { |
- Math: { |
- random: () => randomResult, |
- min: Math.min, |
- max: Math.max, |
- round: Math.round |
- } |
+ Math: Object.create(Math, { |
+ random: { |
+ value: () => randomResult |
+ } |
+ }) |
}; |
}; |
exports.unexpectedError = function(error) |
{ |
console.error(error); |
this.ok(false, "Unexpected error: " + error); |
}; |