(
name: string,
options: {
serverPath: ServerPath
git?: boolean
config?: Partial<ConfigV1.Info>
setup?: (dir: string) => Effect.Effect<void, E, TestServices>
},
run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>,
)
| 198 | } |
| 199 | |
| 200 | function httpapiInstance<A, E>( |
| 201 | name: string, |
| 202 | options: { |
| 203 | serverPath: ServerPath |
| 204 | git?: boolean |
| 205 | config?: Partial<ConfigV1.Info> |
| 206 | setup?: (dir: string) => Effect.Effect<void, E, TestServices> |
| 207 | }, |
| 208 | run: (input: ProjectFixture) => Effect.Effect<A, E, TestScope>, |
| 209 | ) { |
| 210 | it.instance( |
| 211 | name, |
| 212 | Effect.gen(function* () { |
| 213 | const instance = yield* TestInstance |
| 214 | yield* options.setup?.(instance.directory) ?? Effect.void |
| 215 | return yield* run({ sdk: yield* client(options.serverPath, instance.directory), directory: instance.directory }) |
| 216 | }), |
| 217 | { git: options.git ?? true, config: { formatter: false, lsp: false, ...options.config } }, |
| 218 | ) |
| 219 | } |
| 220 | |
| 221 | function serverPathParity<A, E>(name: string, scenario: (serverPath: ServerPath) => Effect.Effect<A, E, TestScope>) { |
| 222 | it.live(name, scenario("raw")) |
no test coverage detected