()
| 2429 | |
| 2430 | it('should throw an error if two rows share an id', () => { |
| 2431 | function DuplicateRowIds() { |
| 2432 | return ( |
| 2433 | <Table aria-label="Files"> |
| 2434 | <TableHeader> |
| 2435 | <Column isRowHeader>Name</Column> |
| 2436 | <Column>Type</Column> |
| 2437 | </TableHeader> |
| 2438 | <TableBody> |
| 2439 | <Row id="1"> |
| 2440 | <Cell>Games</Cell> |
| 2441 | <Cell>File folder</Cell> |
| 2442 | </Row> |
| 2443 | <Row id="1"> |
| 2444 | <Cell>Program Files</Cell> |
| 2445 | <Cell>File folder</Cell> |
| 2446 | </Row> |
| 2447 | <Row id="2"> |
| 2448 | <Cell>bootmgr</Cell> |
| 2449 | <Cell>System file</Cell> |
| 2450 | </Row> |
| 2451 | </TableBody> |
| 2452 | </Table> |
| 2453 | ); |
| 2454 | } |
| 2455 | |
| 2456 | expect(() => render(<DuplicateRowIds />)).toThrow( |
| 2457 | 'Duplicate key "1" found in collection. Every item in a collection must have a unique key.' |
nothing calls this directly
no outgoing calls
no test coverage detected