Skip to content

Commit

Permalink
Improve indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Jul 5, 2024
1 parent 8888f64 commit 246dd98
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions code/core/src/preview-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,20 @@ export class MountMustBeDestructuredError extends StorybookError {
super({
category: Category.PREVIEW_API,
code: 12,
documentation:
'https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test',
message: dedent`
To use mount in the play function, you must use object destructuring, e.g. play: ({ mount }) => {}.
${
!transpiled
? ''
: dedent`
It seems that your builder is configured to transpile destructuring.
To use the mount prop, you need to configure your builder to transpile not further than ES2017.
`
It seems that your builder is configured to transpile destructuring.
To use the mount prop of the story context, you need to configure your builder to transpile not further than ES2017.
`
}
More info: https://storybook.js.org/docs/writing-tests/interaction-testing#run-code-before-each-test
Received the following play function:
${data.playFunction}
`,
Expand Down

0 comments on commit 246dd98

Please sign in to comment.