(Component, props = {}, tag = 'h1')
| 10 | } |
| 11 | |
| 12 | export function testForCustomTag(Component, props = {}, tag = 'h1') { |
| 13 | render(<Component {...props} tag={tag} data-testid="test" />); |
| 14 | const node = screen.getByTestId('test'); |
| 15 | expect(node.tagName.toLowerCase()).toMatch(tag); |
| 16 | } |
| 17 | |
| 18 | export function testForCustomAttribute(Component, props = {}) { |
| 19 | render( |
no outgoing calls
no test coverage detected
searching dependent graphs…