fix(core): update

This commit is contained in:
Philipp Kunz 2018-11-23 18:48:07 +01:00
parent f02df7789c
commit 8f6272eca4
2 changed files with 9 additions and 0 deletions

View File

@ -15,4 +15,12 @@ tap.test('should start timer', async () => {
await testTimer.completed;
});
tap.test('should reset a timer', async () => {
testTimer.reset();
testTimer.start();
testTimer.reset();
testTimer.start();
await testTimer.completed;
});
tap.start();

View File

@ -62,6 +62,7 @@ export class Timer {
public pause() {
clearTimeout(this.currentTimeout);
this.currentTimeout = null;
this.pausedAt = TimeStamp.fromTimeStamp(this.startedAt);
}