mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-20 10:27:54 +00:00
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:
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# playwright only supports ubuntu/debian officially, and on CI VMs its system deps are pre-installed
|
||||
if [ -z "${GITHUB_ACTIONS:-}" ] && [ "$(uname -s)" = "Linux" ] && grep -qE '^ID(_LIKE)?=.*(ubuntu|debian)' /etc/os-release 2>/dev/null; then
|
||||
pnpm exec playwright install --with-deps "$@"
|
||||
else
|
||||
pnpm exec playwright install "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user