mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 13:44:12 +00:00
refactor: add options to hide schedule
This commit is contained in:
committed by
Carlos Valente
parent
8bd7645c95
commit
7b932ef0f7
@@ -1,4 +1,4 @@
|
||||
import { millisToHours, millisToMinutes, millisToSeconds } from "./conversionUtils";
|
||||
import { millisToHours, millisToMinutes, millisToSeconds, secondsInMillis } from './conversionUtils';
|
||||
|
||||
describe('millisToSecond()', () => {
|
||||
test('null values', () => {
|
||||
@@ -112,3 +112,14 @@ describe('millisToHours()', () => {
|
||||
expect(millisToHours(t.val)).toBe(t.result);
|
||||
});
|
||||
});
|
||||
|
||||
describe('secondsInMillis()', () => {
|
||||
it('return 0 if value is null', () => {
|
||||
expect(secondsInMillis(null)).toBe(0);
|
||||
});
|
||||
it('returns the seconds value of a millis date', () => {
|
||||
const date = 1686255053619; // Thu Jun 08 2023 20:10:53
|
||||
const seconds = secondsInMillis(date);
|
||||
expect(seconds).toBe(53);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user