Use DurationInSeconds for expireTimer
This commit is contained in:
parent
cf57c7aaf0
commit
6be69a7ba8
59 changed files with 411 additions and 216 deletions
|
@ -2,8 +2,12 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as durations from '../../util/durations';
|
||||
import { DurationInSeconds } from '../../util/durations';
|
||||
|
||||
export type TestExpireTimer = Readonly<{ value: number; label: string }>;
|
||||
export type TestExpireTimer = Readonly<{
|
||||
value: DurationInSeconds;
|
||||
label: string;
|
||||
}>;
|
||||
|
||||
export const EXPIRE_TIMERS: ReadonlyArray<TestExpireTimer> = [
|
||||
{ value: 42 * durations.SECOND, label: '42 seconds' },
|
||||
|
@ -11,4 +15,9 @@ export const EXPIRE_TIMERS: ReadonlyArray<TestExpireTimer> = [
|
|||
{ value: 1 * durations.HOUR, label: '1 hour' },
|
||||
{ value: 6 * durations.DAY, label: '6 days' },
|
||||
{ value: 3 * durations.WEEK, label: '3 weeks' },
|
||||
];
|
||||
].map(({ value, label }) => {
|
||||
return {
|
||||
value: DurationInSeconds.fromMillis(value),
|
||||
label,
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue