(situation: string, dir = DEFAULT_BASELINE_DIR)
| 166 | |
| 167 | /** Read a previously-captured baseline, or null if none exists yet. */ |
| 168 | export function readShipBaseline(situation: string, dir = DEFAULT_BASELINE_DIR): ShipBaseline | null { |
| 169 | try { |
| 170 | return JSON.parse(fs.readFileSync(baselinePath(situation, dir), 'utf-8')) as ShipBaseline; |
| 171 | } catch { |
| 172 | return null; |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | export interface ShipActionDiff { |
| 177 | /** Actions the baseline performed that the current run did NOT (the regression set). */ |
no test coverage detected