mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-09 00:19:13 +08:00
945 B
945 B
import MockDate from 'mockdate';
// ...
export const ChristmasUI = {
async play({ canvasElement }) {
MockDate.set('2024-12-25');
// 👇Render the component with the mocked date
await mount();
// act and/or assert
},
};
import MockDate from 'mockdate';
// ...
export const ChristmasUI: Story = {
async play({ canvasElement }) {
MockDate.set('2024-12-25');
// 👇Render the component with the mocked date
await mount();
// act and/or assert
},
};
import MockDate from 'mockdate';
// ...
export const ChristmasUI: Story = {
async play({ mount }) {
MockDate.set('2024-12-25');
// 👇Render the component with the mocked date
await mount();
// act and/or assert
},
};