(options: Options, scenario: ActiveScenario)
| 30 | } |
| 31 | |
| 32 | function runActive(options: Options, scenario: ActiveScenario) { |
| 33 | if (options.mode === "auth") return runAuth(scenario) |
| 34 | |
| 35 | return withContext(options, scenario, "shared", (ctx) => |
| 36 | Effect.gen(function* () { |
| 37 | yield* trace(options, scenario, "request start") |
| 38 | const result = yield* call(scenario, ctx) |
| 39 | yield* trace(options, scenario, `response ${result.status}`) |
| 40 | yield* trace(options, scenario, "expect start") |
| 41 | yield* scenario.expect(ctx, ctx.state, result) |
| 42 | yield* trace(options, scenario, "expect done") |
| 43 | }), |
| 44 | ) |
| 45 | } |
| 46 | |
| 47 | function runAuth(scenario: ActiveScenario) { |
| 48 | return Effect.gen(function* () { |
no test coverage detected