Skip to content

Commit

Permalink
test: coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Mar 8, 2024
1 parent 0b28fc5 commit ea81dbe
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions components/tour/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,24 @@ describe('Tour', () => {
expect(document.querySelector('.should-be-primary')).toBeTruthy();
expect(document.querySelector('.should-be-primary')).toHaveClass('ant-tour-primary');
});

// This test is for PurePanel which means safe to remove.
describe('PurePanel', () => {
const PurePanel = Tour._InternalPanelDoNotUseOrYouWillBeFired;

it('closeIcon', () => {
const { container } = render(
<PurePanel
closeIcon={[
<span className="bamboo" key="bamboo" />,
<span className="little" key="little" />,
]}
title="a"
/>,
);

expect(container.querySelector('.bamboo')).toBeTruthy();
expect(container.querySelector('.little')).toBeTruthy();
});
});
});

0 comments on commit ea81dbe

Please sign in to comment.