(
serverPath: ServerPath,
options: {
git?: boolean
config?: Partial<ConfigV1.Info>
setup?: (dir: string) => Effect.Effect<void, E2, TestServices>
},
run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>,
)
| 223 | } |
| 224 | |
| 225 | function withProject<A, E, E2 = never>( |
| 226 | serverPath: ServerPath, |
| 227 | options: { |
| 228 | git?: boolean |
| 229 | config?: Partial<ConfigV1.Info> |
| 230 | setup?: (dir: string) => Effect.Effect<void, E2, TestServices> |
| 231 | }, |
| 232 | run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>, |
| 233 | ) { |
| 234 | return Effect.gen(function* () { |
| 235 | const directory = yield* tmpdirScoped({ |
| 236 | git: options.git ?? false, |
| 237 | config: { formatter: false, lsp: false, ...options.config }, |
| 238 | }) |
| 239 | yield* options.setup?.(directory) ?? Effect.void |
| 240 | return yield* run({ sdk: yield* client(serverPath, directory), directory }) |
| 241 | }) |
| 242 | } |
| 243 | |
| 244 | function withStandardProject<A, E>( |
| 245 | serverPath: ServerPath, |
no test coverage detected