refactor: type improvements (#751)

This commit is contained in:
Carlos Valente
2024-01-31 14:42:33 +01:00
committed by GitHub
parent 7eb9ee8d03
commit cf08bfc796
17 changed files with 48 additions and 37 deletions
@@ -10,8 +10,6 @@ export class SimpleTimer {
private startedAt: number | null = null;
private pausedAt: number | null = null;
constructor() {}
public reset() {
this.state = {
duration: 0,
@@ -72,7 +72,8 @@ describe('SimpleTimer count-down', () => {
expect(newState).toStrictEqual(expected);
newState = timer.update(1800);
(expected.current = initialTime - 1800 + pausedTime), expect(newState).toStrictEqual(expected);
expected.current = initialTime - 1800 + pausedTime;
expect(newState).toStrictEqual(expected);
});
test('stopping the timer clears the running data', () => {