({ status = 200, json = {} } = {})
| 100 | } |
| 101 | |
| 102 | function responseFromJson({ status = 200, json = {} } = {}) { |
| 103 | return { |
| 104 | ok: status >= 200 && status < 300, |
| 105 | status, |
| 106 | headers: { get: () => null }, |
| 107 | json: async () => json, |
| 108 | text: async () => JSON.stringify(json), |
| 109 | }; |
| 110 | } |
| 111 | |
| 112 | // Drive EVOLVER_HOME so paths.getEvomapDir() routes to the fake dir. |
| 113 | // Resetting _cachedNodeId before each case prevents a previous test's |
no outgoing calls
no test coverage detected