MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / testForCustomAttribute

Function testForCustomAttribute

src/testUtils.js:18–24  ·  view source on GitHub ↗
(Component, props = {})

Source from the content-addressed store, hash-verified

16}
17
18export 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
26export function testForDefaultTag(Component, tag) {
27 render(<Component data-testid="test" />);

Callers 1

Toast.spec.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…