test: run frontend unit tests in browsers (#38860)

Run them in headless [vitest browser
mode](https://vitest.dev/guide/browser/) in chromium and firefox.
Similar UX than current tests, it's about 5 times as slow (goes from 1s
to 5s on my machine), but definitely worth it as it removes all
happy-dom problems.

---------

Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
silverwind
2026-08-18 00:22:54 +02:00
committed by GitHub
parent 55e7cafcb6
commit df71d5f5e2
22 changed files with 211 additions and 146 deletions
+1 -1
View File
@@ -1095,7 +1095,7 @@ export default defineConfig([
},
},
{
files: ['**/*.test.ts', 'web_src/js/test/setup.ts'],
files: ['**/*.test.ts', 'web_src/js/vitest.setup.ts'],
plugins: {vitest},
languageOptions: {globals: globals.vitest},
rules: {