(scenario: RecordedScenario)
| 238 | .replace(/"(access|access_token|refresh|refresh_token|accountId|account_id)"\s*:\s*"[^"]+"/g, '"$1":"redacted"') |
| 239 | |
| 240 | function authLayer(scenario: RecordedScenario) { |
| 241 | const replayAuth = shouldRecord ? scenario.recordAuth?.() : scenario.replayAuth |
| 242 | if (!replayAuth) return undefined |
| 243 | return Layer.mock(Auth.Service)({ |
| 244 | get: (providerID) => Effect.succeed(providerID === scenario.providerID ? replayAuth : undefined), |
| 245 | all: () => Effect.succeed({ [scenario.providerID]: replayAuth }), |
| 246 | }) |
| 247 | } |
| 248 | |
| 249 | async function loadFixture(providerID: string, modelID: string) { |
| 250 | const data = await modelsFixture |
no outgoing calls
no test coverage detected