@stryker-mutator/mocha-runner
Version:
A plugin to use the mocha test runner in Stryker, the JavaScript mutation testing framework
15 lines • 361 B
JavaScript
// A test can mock away the 'real' Date class. Capture it while we still can.
const RealDate = Date;
export class Timer {
start;
constructor() {
this.reset();
}
reset() {
this.start = new RealDate();
}
elapsedMs() {
return new RealDate().getTime() - this.start.getTime();
}
}
//# sourceMappingURL=timer.js.map