Skip to content

Commit

Permalink
fix: increase test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigamaE committed Apr 26, 2024
1 parent cf0504f commit a7214d6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/drawer/__tests__/Drawer.test.tsx
Expand Up @@ -190,6 +190,22 @@ describe('Drawer', () => {
triggerMotion();
expect(wrapper.firstChild).toMatchSnapshot();
});
it('have a custom loading', () => {
const loadingContent = 'Custom Loading...';
const { container: wrapper } = render(
<Drawer
open
loading={{ indicator: <span>{loadingContent}</span>, spinning: true }}
getContainer={false}
>
Here is content of Drawer
</Drawer>,
);

triggerMotion();
const [loadingWrapper] = wrapper.getElementsByClassName('ant-spin-dot');
expect(loadingWrapper).toHaveTextContent(loadingContent);
});
});

it('support closeIcon', () => {
Expand Down

0 comments on commit a7214d6

Please sign in to comment.