Replace @testing-library/jest-dom with built-in vitest browser assertions

This commit is contained in:
Alejandro Celaya
2026-08-16 19:32:41 +02:00
parent ba73644871
commit 585d7c6f63
30 changed files with 305 additions and 429 deletions

View File

@@ -45,10 +45,10 @@ describe('<ServerError />', () => {
notFound: ['Could not find this Shlink server.'],
},
],
])('renders expected information based on provided server type', (selectedServer, { found, notFound }) => {
])('renders expected information based on provided server type', async (selectedServer, { found, notFound }) => {
setUp(selectedServer);
found.forEach((text) => expect(screen.getByText(text)).toBeInTheDocument());
notFound.forEach((text) => expect(screen.queryByText(text)).not.toBeInTheDocument());
await Promise.all(found.map((text) => expect.element(screen.getByText(text)).toBeInTheDocument()));
await Promise.all(notFound.map((text) => expect.element(screen.queryByText(text)).not.toBeInTheDocument()));
});
});