This is a crosspost
I am using Playwright as my provider in the vitest configuration file and chromium as my browser instance.
The vitest-browser-vue docs are more or less clear on how to write a simple component test. I therefore created two simple components and wrote the folllowing tests:
test("Component 1", async () => {
await render(Component1, {
props: { items: ["item one", "item two", "item three"] },
});
});
test("Component 2", async () => {
await render(Component2, {
props: { items: ["item one", "item two"] },
});
});
When I launch the test suite a browser window opens, showing me the Vitest browser mode UI. The first test runs and passes. The second test fails with the following error:
NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
Is this a bug? or am I doing something wrong on my end? Is vitest-browser-vue equipped to run two consecutive tests on two different Vue components? If not what is the point?