stryker-mocha-runner
Version:
A plugin to use the mocha test runner in Stryker, the JavaScript mutation testing framework
18 lines • 553 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
// A test can mock away the 'real' Date class. Capture it while we still can.
var RealDate = Date;
var Timer = /** @class */ (function () {
function Timer() {
this.reset();
}
Timer.prototype.reset = function () {
this.start = new RealDate();
};
Timer.prototype.elapsedMs = function () {
return new RealDate().getTime() - this.start.getTime();
};
return Timer;
}());
exports.default = Timer;
//# sourceMappingURL=Timer.js.map