We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be6b25a commit 1e574c6Copy full SHA for 1e574c6
common/tests/unit/timestamp.spec.ts
@@ -4,8 +4,9 @@ import { calculateCurrentPosition } from "../../timestamp";
4
5
describe("calculateCurrentPosition", () => {
6
it("should calculate the correct playback position", () => {
7
- expect(calculateCurrentPosition(dayjs(), dayjs(), 0)).toBeCloseTo(0);
8
- expect(calculateCurrentPosition(dayjs(), dayjs(), 1)).toBeCloseTo(1);
+ const now = dayjs();
+ expect(calculateCurrentPosition(now, now, 0)).toBeCloseTo(0);
9
+ expect(calculateCurrentPosition(now, now, 1)).toBeCloseTo(1);
10
expect(
11
calculateCurrentPosition(
12
dayjs("8 Mar 2020 05:00:00 GMT"),
0 commit comments