Tests for GetCommitDartFiles
(t *testing.T)
| 263 | // Tests for GetCommitDartFiles |
| 264 | |
| 265 | func TestGetCommitDartFiles_SingleCommit(t *testing.T) { |
| 266 | tmpDir := t.TempDir() |
| 267 | setupGitRepo(t, tmpDir) |
| 268 | |
| 269 | // Create and commit .dart file |
| 270 | createDartFile(t, tmpDir, "test.dart") |
| 271 | gitAdd(t, tmpDir, "test.dart") |
| 272 | commitID := gitCommitAndGetSHA(t, tmpDir, "Add test.dart") |
| 273 | |
| 274 | // Get files from commit |
| 275 | files, err := GetCommitDartFiles(tmpDir, commitID) |
| 276 | |
| 277 | require.NoError(t, err) |
| 278 | g := testhelpers.TextGoldie(t) |
| 279 | g.Assert(t, t.Name(), []byte(normalizeFilePaths(tmpDir, files))) |
| 280 | } |
| 281 | |
| 282 | func TestGetCommitDartFiles_MultipleFiles(t *testing.T) { |
| 283 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected