(t *testing.T)
| 330 | } |
| 331 | |
| 332 | func TestSearchSnapshot_FuzzyFallbackEndToEnd(t *testing.T) { |
| 333 | t.Parallel() |
| 334 | snap := filefinder.MakeTestSnapshot([]string{"src/handler.go", "src/middleware.go", "pkg/config.go"}) |
| 335 | plan := filefinder.NewQueryPlanForTest("hndlr") |
| 336 | results := filefinder.MergeAndScoreForTest(filefinder.SearchSnapshotForTest(plan, snap, 100), plan, filefinder.DefaultScoreParamsForTest(), 10) |
| 337 | if len(results) == 0 { |
| 338 | t.Fatal("expected fuzzy fallback to produce scored results for 'hndlr'") |
| 339 | } |
| 340 | if results[0].Path != "src/handler.go" { |
| 341 | t.Errorf("expected top result 'src/handler.go', got %q", results[0].Path) |
| 342 | } |
| 343 | } |
nothing calls this directly
no test coverage detected