Skip to content

Commit

Permalink
Merge pull request #3977 from ProjectMirador/func-ref
Browse files Browse the repository at this point in the history
Use a function mock ref instead of a string.
  • Loading branch information
marlo-longley authored Nov 7, 2024
2 parents d4e49e2 + 2bd95cf commit 44e7b2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion __tests__/src/components/ManifestListItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function createWrapper(props) {

describe('ManifestListItem', () => {
it('renders without an error', () => {
createWrapper({ buttonRef: 'ref' });
createWrapper({ buttonRef: jest.fn() });

expect(screen.getByRole('listitem')).toHaveAttribute('data-manifestid', 'http://example.com');
expect(screen.getByRole('listitem')).toHaveClass('MuiListItem-root');
Expand Down

0 comments on commit 44e7b2b

Please sign in to comment.