fix(test): Chromaticが落ちているのを一部修正? (#13435)

* fix(test): Chromaticが落ちているのを修正?

* いらん変更をけす

* 未来過ぎた
This commit is contained in:
かっこかり 2024-02-23 14:13:46 +09:00 committed by GitHub
parent 64953fadc9
commit 30fe072606
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ import MkTime from './MkTime.vue';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
import { dateTimeFormat } from '@/scripts/intl-const.js'; import { dateTimeFormat } from '@/scripts/intl-const.js';
const now = new Date('2023-04-01T00:00:00.000Z'); const now = new Date('2023-04-01T00:00:00.000Z');
const future = new Date(8640000000000000); const future = new Date('3000-04-01T00:00:00.000Z');
const oneHourAgo = new Date(now.getTime() - 3600000); const oneHourAgo = new Date(now.getTime() - 3600000);
const oneDayAgo = new Date(now.getTime() - 86400000); const oneDayAgo = new Date(now.getTime() - 86400000);
const oneWeekAgo = new Date(now.getTime() - 604800000); const oneWeekAgo = new Date(now.getTime() - 604800000);
@ -49,11 +49,12 @@ export const Empty = {
export const RelativeFuture = { export const RelativeFuture = {
...Empty, ...Empty,
async play({ canvasElement }) { async play({ canvasElement }) {
await expect(canvasElement).toHaveTextContent(i18n.ts._ago.future); await expect(canvasElement).toHaveTextContent(i18n.tsx._timeIn.years({ n: 977 }));
}, },
args: { args: {
...Empty.args, ...Empty.args,
time: future, time: future,
origin: now,
}, },
} satisfies StoryObj<typeof MkTime>; } satisfies StoryObj<typeof MkTime>;
export const AbsoluteFuture = { export const AbsoluteFuture = {