( value: Record<string, unknown>, required: ReadonlyArray<string>, label: string, )
| 117 | } |
| 118 | |
| 119 | function expectRequired( |
| 120 | value: Record<string, unknown>, |
| 121 | required: ReadonlyArray<string>, |
| 122 | label: string, |
| 123 | ) { |
| 124 | for (const field of required) { |
| 125 | expect(field in value, `${label}: missing required field "${field}"`).toBe(true); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | function expectStringOrNull(v: unknown, label: string) { |
| 130 | if (v === null) return; |
no outgoing calls
no test coverage detected