@@ -18,7 +18,7 @@ function createMockRuntime(responses: Map<string, { stdout: string; exitCode: nu
1818 }
1919 }
2020 }
21-
21+
2222 response = response ?? { stdout : "" , exitCode : 1 } ;
2323
2424 return Promise . resolve ( {
@@ -107,14 +107,7 @@ describe("listScripts", () => {
107107 "echo 'testing...'" ,
108108 ] . join ( "\n" ) ;
109109
110- const runtime = createMockRuntime (
111- new Map ( [
112- [
113- separator ,
114- { stdout : output , exitCode : 0 } ,
115- ] ,
116- ] )
117- ) ;
110+ const runtime = createMockRuntime ( new Map ( [ [ separator , { stdout : output , exitCode : 0 } ] ] ) ) ;
118111
119112 const scripts = await listScripts ( runtime , "/test/workspace/desc" ) ;
120113 expect ( scripts ) . toEqual ( [
@@ -140,14 +133,7 @@ describe("listScripts", () => {
140133 "echo 'building...'" ,
141134 ] . join ( "\n" ) ;
142135
143- const runtime = createMockRuntime (
144- new Map ( [
145- [
146- separator ,
147- { stdout : output , exitCode : 0 } ,
148- ] ,
149- ] )
150- ) ;
136+ const runtime = createMockRuntime ( new Map ( [ [ separator , { stdout : output , exitCode : 0 } ] ] ) ) ;
151137
152138 const scripts = await listScripts ( runtime , "/test/workspace/annotation" ) ;
153139 expect ( scripts ) . toEqual ( [
@@ -172,14 +158,7 @@ describe("listScripts", () => {
172158 " # Description: Indented description" ,
173159 ] . join ( "\n" ) ;
174160
175- const runtime = createMockRuntime (
176- new Map ( [
177- [
178- separator ,
179- { stdout : output , exitCode : 0 } ,
180- ] ,
181- ] )
182- ) ;
161+ const runtime = createMockRuntime ( new Map ( [ [ separator , { stdout : output , exitCode : 0 } ] ] ) ) ;
183162
184163 const scripts = await listScripts ( runtime , "/test/workspace/case" ) ;
185164 expect ( scripts ) . toEqual ( [
@@ -204,14 +183,7 @@ describe("listScripts", () => {
204183 " # @description Indented tool description" ,
205184 ] . join ( "\n" ) ;
206185
207- const runtime = createMockRuntime (
208- new Map ( [
209- [
210- separator ,
211- { stdout : output , exitCode : 0 } ,
212- ] ,
213- ] )
214- ) ;
186+ const runtime = createMockRuntime ( new Map ( [ [ separator , { stdout : output , exitCode : 0 } ] ] ) ) ;
215187
216188 const scripts = await listScripts ( runtime , "/test/workspace/tool" ) ;
217189 expect ( scripts ) . toEqual ( [
@@ -231,14 +203,7 @@ describe("listScripts", () => {
231203 "echo 'no description'" ,
232204 ] . join ( "\n" ) ;
233205
234- const runtime = createMockRuntime (
235- new Map ( [
236- [
237- separator ,
238- { stdout : output , exitCode : 0 } ,
239- ] ,
240- ] )
241- ) ;
206+ const runtime = createMockRuntime ( new Map ( [ [ separator , { stdout : output , exitCode : 0 } ] ] ) ) ;
242207
243208 const scripts = await listScripts ( runtime , "/test/workspace/nodesc" ) ;
244209 expect ( scripts ) . toEqual ( [
0 commit comments