Skip to content

Commit

Permalink
Fix snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
gabescarbrough committed May 7, 2024
1 parent 30f2e9c commit 8bdc8b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/RichTextEditor/RichTextEditor.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render, screen } from '@testing-library/react';
import { render, screen, waitFor } from '@testing-library/react';
import React from 'react';

import RichTextEditor, { type RichTextEditorProps } from './RichTextEditor';
Expand All @@ -12,9 +12,11 @@ describe('<RichTextEditor />', () => {
/>
);

it('renders snapshot', () => {
it('renders snapshot', async () => {
const { asFragment } = render(<Setup />);

await waitFor(() => screen.getByRole('button', { name: /bold/i }));

expect(asFragment()).toMatchSnapshot();
});

Expand Down

0 comments on commit 8bdc8b5

Please sign in to comment.