mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
fix(test): resolve testdata relative to browser_test.go
This commit is contained in:
1 parent
cb2a1cb8d5
commit
251680bda3
1 file changed
+6
-1
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user