Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Jun 26, 2024
1 parent d229564 commit 91eeb7a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ export default {
args: { label: 'Button' },
};

async function fn({ destructure }) {
console.log(destructure);
}

// We must not transpile destructuring, to make sure that we can analyze the context properties that are used in play.
// See: https://github.com/storybookjs/storybook/discussions/27389
export const DestructureNotTranspiled = {
async play() {
await expect(fn.toString()).toBe('async function fn({ destructure }) {}');
async function a({ b }) {
console.log(b);
}
await expect(a.toString()).toBe('async function a({ b }) {}');
},
};

0 comments on commit 91eeb7a

Please sign in to comment.