Add initial keyboard shortcut support.

This commit is contained in:
Dermot Duffy
2024-06-05 21:44:17 -07:00
parent 904f6d8142
commit 7ab545738d
186 changed files with 9564 additions and 3658 deletions
@@ -0,0 +1,20 @@
import { describe, expect, it } from 'vitest';
import { timeDeltaToSeconds } from '../../../../src/card-controller/actions/utils/time-delta';
describe('timeDeltaToSeconds', () => {
it('hours', () => {
expect(timeDeltaToSeconds({ h: 1 })).toBe(3600);
});
it('minutes', () => {
expect(timeDeltaToSeconds({ m: 1 })).toBe(60);
});
it('seconds', () => {
expect(timeDeltaToSeconds({ s: 1 })).toBe(1);
});
it('milliseconds', () => {
expect(timeDeltaToSeconds({ ms: 1 })).toBe(0.001);
});
it('combination', () => {
expect(timeDeltaToSeconds({ h: 1, m: 2, s: 3, ms: 4 })).toBe(3723.004);
});
});