wasm: add tests

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-04-09 09:28:25 -04:00
parent cc1d5b71da
commit e4863ba484
9 changed files with 381 additions and 12 deletions

View File

@@ -25,6 +25,7 @@ import (
"os"
"os/exec"
"strconv"
"strings"
"testing"
"time"
@@ -378,7 +379,7 @@ func saveScreenshot(t *testing.T, page playwright.Page) {
return
}
f, err := os.CreateTemp("", "anubis-test-fail-*.png")
f, err := os.CreateTemp("./var", "anubis-test-fail-"+strings.ReplaceAll(t.Name(), "/", "--")+"-*.png")
if err != nil {
t.Logf("could not create temporary file: %v", err)
return