({ status = 200, json = {} } = {})
| 75 | } |
| 76 | |
| 77 | function responseFromJson({ status = 200, json = {} } = {}) { |
| 78 | return { |
| 79 | ok: status >= 200 && status < 300, |
| 80 | status, |
| 81 | headers: { get: () => null }, |
| 82 | json: async () => json, |
| 83 | text: async () => JSON.stringify(json), |
| 84 | }; |
| 85 | } |
| 86 | |
| 87 | // Run `body` with EVOLVER_HOME pointed at the given fake .evomap dir. |
| 88 | // The reader routes through `paths.getEvomapDir()`, which honours |
no outgoing calls
no test coverage detected