MCPcopy Index your code
hub / github.com/coder/coder / TestSearchSnapshot_ShortQuery

Function TestSearchSnapshot_ShortQuery

agent/filefinder/query_test.go:119–127  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

117}
118
119func TestSearchSnapshot_ShortQuery(t *testing.T) {
120 t.Parallel()
121 snap := filefinder.MakeTestSnapshot([]string{"foo.go", "bar.go", "fab.go"})
122 cands := filefinder.SearchSnapshotForTest(filefinder.NewQueryPlanForTest("fo"), snap, 100)
123 if len(cands) == 0 {
124 t.Fatal("expected at least 1 candidate for 'fo'")
125 }
126 requireCandHasPath(t, cands, "foo.go")
127}
128
129func TestSearchSnapshot_FuzzyFallback(t *testing.T) {
130 t.Parallel()

Callers

nothing calls this directly

Calls 3

MakeTestSnapshotFunction · 0.92
requireCandHasPathFunction · 0.85
FatalMethod · 0.80

Tested by

no test coverage detected