fix(site): storybook: move spyOn to beforeEach (#18559)

Fixes: https://github.com/coder/internal/issues/741
This commit is contained in:
Marcin Tojek
2025-06-25 10:45:55 +02:00
committed by GitHub
parent b5316d2b42
commit f6d9765daf

View File

@ -15,8 +15,10 @@ export default meta;
type Story = StoryObj<typeof Troubleshooting>;
export const TestNotification: Story = {
play: async ({ canvasElement }) => {
beforeEach() {
spyOn(API, "postTestNotification").mockResolvedValue();
},
play: async ({ canvasElement }) => {
const user = userEvent.setup();
const canvas = within(canvasElement);