(
serverPath: ServerPath,
options: { setup?: (dir: string) => Effect.Effect<void, E, TestServices> },
run: (input: LlmProjectFixture) => Effect.Effect<A, E, TestScope>,
)
| 256 | } |
| 257 | |
| 258 | function withFakeLlmProject<A, E>( |
| 259 | serverPath: ServerPath, |
| 260 | options: { setup?: (dir: string) => Effect.Effect<void, E, TestServices> }, |
| 261 | run: (input: LlmProjectFixture) => Effect.Effect<A, E, TestScope>, |
| 262 | ) { |
| 263 | return Effect.gen(function* () { |
| 264 | const llm = yield* TestLLMServer |
| 265 | return yield* withProject( |
| 266 | serverPath, |
| 267 | { |
| 268 | config: testProviderConfig(llm.url), |
| 269 | setup: options.setup, |
| 270 | }, |
| 271 | (input) => run({ ...input, llm }), |
| 272 | ) |
| 273 | }).pipe(Effect.provide(TestLLMServer.layer)) |
| 274 | } |
| 275 | |
| 276 | function writeStandardFiles(dir: string) { |
| 277 | return FSUtil.Service.use((fs) => |
no test coverage detected