So I have a component that checks a flag and based on if the flag returns true or false, we do something with it. The issue I have is when I am mocking according to LD documentation, the flag is coming back as undefined instead of true or false. Not sure what I am doing wrong here
test( username should not be clickable when flag is on , async () => {
// ARRANGE
mockFlags({
myProfile: true,
});
render(<ClientInfo reservation={reservation} />);
// ASSERT
const userName = screen.getByText( Test Test );
expect(userName).toHaveAttribute( href , profileLink);
});
In the component when I console log the flag, I see undefined. Not sure what I am doing wrong in my react app that is causing this. Any ideas?