File tree Expand file tree Collapse file tree
packages/opencode/test/file Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,25 +37,6 @@ describe("file.ripgrep", () => {
3737 expect ( hasHidden ) . toBe ( false )
3838 } )
3939
40- test ( "search returns match metadata" , async ( ) => {
41- await using tmp = await tmpdir ( {
42- init : async ( dir ) => {
43- await Bun . write ( path . join ( dir , "match.ts" ) , "const value = 'needle'\n" )
44- await Bun . write ( path . join ( dir , "other.ts" ) , "const value = 'other'\n" )
45- } ,
46- } )
47-
48- const hits = await Ripgrep . search ( {
49- cwd : tmp . path ,
50- pattern : "needle" ,
51- } )
52-
53- expect ( hits . length ) . toBe ( 1 )
54- expect ( path . basename ( hits [ 0 ] ?. path . text ?? "" ) ) . toBe ( "match.ts" )
55- expect ( hits [ 0 ] ?. line_number ) . toBe ( 1 )
56- expect ( hits [ 0 ] ?. lines . text ) . toContain ( "needle" )
57- } )
58-
5940 test ( "search returns empty when nothing matches" , async ( ) => {
6041 await using tmp = await tmpdir ( {
6142 init : async ( dir ) => {
You can’t perform that action at this time.
0 commit comments