TestdataDir returns the path to the testdata directory at the project root.
()
| 138 | |
| 139 | // TestdataDir returns the path to the testdata directory at the project root. |
| 140 | func TestdataDir() string { |
| 141 | _, filename, _, _ := runtime.Caller(0) |
| 142 | return filepath.Join(filepath.Dir(filename), "..", "..", "testdata") |
| 143 | } |
| 144 | |
| 145 | // LoadFixture reads a JSON fixture file from testdata/. |
| 146 | func LoadFixture(name string) string { |