MCPcopy Index your code
hub / github.com/reactstrap/reactstrap / testForCustomClass

Function testForCustomClass

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

Source from the content-addressed store, hash-verified

4import { DropdownContext } from './DropdownContext';
5
6export function testForCustomClass(Component, props = {}) {
7 render(<Component {...props} data-testid="test" className="custom-class" />);
8 const node = screen.getByTestId('test');
9 expect(node).toHaveClass('custom-class');
10}
11
12export function testForCustomTag(Component, props = {}, tag = 'h1') {
13 render(<Component {...props} tag={tag} data-testid="test" />);

Callers 15

CardGroup.spec.jsFile · 0.90
CardHeader.spec.jsFile · 0.90
Card.spec.jsFile · 0.90
NavBrand.spec.jsFile · 0.90
List.spec.jsFile · 0.90
Row.spec.jsFile · 0.90
CardLink.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…