You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using expect or userEvent TS and eslint seem to not agree on what needs to be used
To Reproduce
play: async({ canvasElement })=>{constcanvas=within(canvasElement);constbtn=canvas.getByRole('button');conststyle=window.getComputedStyle(btn);awaituserEvent.click(btn);// await shows a TS error "'await' has no effect on the type of this expression.ts(80007)"expect(btn).toBeVisible();expect(style.backgroundColor).toBe('rgb(255, 233, 120)');expect(btn.innerText).toBe('Large');expect(btn.offsetHeight).toBe(48);// all of the expect functions are lining with a message "Interaction should be awaited: toBeeslint[storybook/await-interactions](https://github.com/storybookjs/eslint-plugin-storybook/blob/main/docs/rules/await-interactions.md)"},
Expected behavior
"Expect" functions do not need to be awaited to work yet eslint is asking for them to be awaited. If you await them the 80007 TS error appears
The text was updated successfully, but these errors were encountered:
In order to enable step-through debugging, calls to userEvent., fireEvent, findBy, waitFor* and expect have to
be await-ed. While debugging, these functions return a Promise that won't resolve until you continue to the next step."
That said, even when I follow these rules, the eslint plugin fails to highlight misuse of await (or absence of await)
Describe the bug
When using expect or userEvent TS and eslint seem to not agree on what needs to be used
To Reproduce
Expected behavior
"Expect" functions do not need to be awaited to work yet eslint is asking for them to be awaited. If you await them the 80007 TS error appears
The text was updated successfully, but these errors were encountered: