(Component, props = {})
| 16 | } |
| 17 | |
| 18 | export function testForCustomAttribute(Component, props = {}) { |
| 19 | render( |
| 20 | <Component {...props} data-testid="test" custom-attribute="custom-value" />, |
| 21 | ); |
| 22 | const node = screen.getByTestId('test'); |
| 23 | expect(node).toHaveAttribute('custom-attribute', 'custom-value'); |
| 24 | } |
| 25 | |
| 26 | export function testForDefaultTag(Component, tag) { |
| 27 | render(<Component data-testid="test" />); |
no outgoing calls
no test coverage detected
searching dependent graphs…