MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / avatarHasClass

Function avatarHasClass

client/src/components/Header/header.test.tsx:78–86  ·  view source on GitHub ↗
(
  componentTree: ReactTestRendererJSON | ReactTestRendererJSON[] | null,
  classes: string
)

Source from the content-addressed store, hash-verified

76const profileNavItem = (component: Component) => component.children[0];
77
78const avatarHasClass = (
79 componentTree: ReactTestRendererJSON | ReactTestRendererJSON[] | null,
80 classes: string
81) => {
82 return (
83 profileNavItem(componentTree as unknown as Component).props.className ===
84 'avatar-container ' + classes
85 );
86};

Callers 1

header.test.tsxFile · 0.85

Calls 1

profileNavItemFunction · 0.85

Tested by

no test coverage detected