mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 01:13:55 +00:00
refactor: type improvements (#751)
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user