(payload, label)
| 1986 | } |
| 1987 | |
| 1988 | function assertRoots(payload, label) { |
| 1989 | assertJson(payload, label); |
| 1990 | if (!Array.isArray(payload.roots) || payload.roots.length === 0) { |
| 1991 | throw new Error(`${label} returned no roots: ${JSON.stringify(payload)}`); |
| 1992 | } |
| 1993 | } |
| 1994 | |
| 1995 | function countAccessibilityNodes(snapshot) { |
| 1996 | const roots = Array.isArray(snapshot?.roots) ? snapshot.roots : []; |
no test coverage detected