(
result: import("./variables.js").VariablesParseResult,
)
| 8 | }); |
| 9 | |
| 10 | function expectErr<T extends { kind: string }>( |
| 11 | result: import("./variables.js").VariablesParseResult, |
| 12 | ): T { |
| 13 | if (result.ok) throw new Error(`expected error, got ${JSON.stringify(result.value)}`); |
| 14 | return result.error as T; |
| 15 | } |
| 16 | |
| 17 | it("returns undefined when neither flag is set", () => { |
| 18 | expect(parseVariablesArg(undefined, undefined)).toEqual({ ok: true, value: undefined }); |