(assertionId, state, opts = {})
| 200 | } |
| 201 | |
| 202 | setAssertionState(assertionId, state, opts = {}) { |
| 203 | if (!Object.values(STATES).includes(state)) { |
| 204 | throw new Error(`invalid assertion state: ${state}`); |
| 205 | } |
| 206 | const a = this.assertions.find((x) => x.id === assertionId); |
| 207 | if (!a) throw new Error(`assertion not found: ${assertionId}`); |
| 208 | a.state = state; |
| 209 | if (opts.evidence !== undefined) a.evidence = opts.evidence || null; |
| 210 | if (opts.lastCheck !== undefined) a.last_check = opts.lastCheck || null; |
| 211 | return a; |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | // ─── Parsing ───────────────────────────────────────────────────────────────── |
no outgoing calls
no test coverage detected