ocavue

Results 92 comments of ocavue

I guess I need to use this to assert the passed function matches the declared type (instead of `(...args: unknown[]) => unknown`) ```ts export function vFunction< T extends (...args: any[])...

I've found the reason and submitted a pull request on the melt repo: https://github.com/melt-ui/next-gen/pull/175

I don't see similar issue from the latest version of BitsUI. If you can reproduce this issue with an example project, I can look into it too.

> Does it work if you move the `vi.mock` inside the test file? Yes, it works! I'm not quite sure why, though. Is this the expected behavior?

> If you only have static imports, the browser will always fetch them in parallel. `vi.mock` on the other hand makes it so every import becomes dynamic and we load...

Testing drag-and-drop requires some lower-level methods like `mouse.down()` and `mouse.move()`. The currently existing [dragAndDrop](https://vitest.dev/guide/browser/interactivity-api.html#userevent-draganddrop) Vitest API is not sufficient. One of the reasons, as I quoted from [Playwright's documentation](https://playwright.dev/docs/input#dragging-manually): >...

@shere-met-va I'm really curious to hear the Vitest team's thoughts on adding `mouse` support for Vitest's browser mode. Do you believe the mouse API is too unreliable to be included...

@Alanoll I don't expect you will see parallel testing issues when using [`vitest-browser-commands`](https://github.com/ocavue/vitest-browser-commands) as it just uses the standard Vitest [Command API](https://vitest.dev/api/browser/commands.html) under the hood.

@Alanoll I believe we are not using the same Playwright `mouse` instance during parallel testing.