fix(test): resolve testdata relative to browser_test.go

This commit is contained in:
pj committed 2026-06-01 22:39:55 +05:30
1 parent cb2a1cb8d5
commit 251680bda3
1 file changed
+6 -1
+6 -1
View File
@@ -169,7 +169,12 @@ func repoRoot(t *testing.T) string {
} }
func testdataDir(t *testing.T) string { func testdataDir(t *testing.T) string {
return filepath.Join(repoRoot(t), "internal", "integration", "testdata") t.Helper()
_, thisFile, _, ok := runtime.Caller(0)
if !ok {
t.Fatal("cannot resolve caller path")
}
return filepath.Join(filepath.Dir(thisFile), "testdata")
} }
func specSrcDir(t *testing.T) string { func specSrcDir(t *testing.T) string {