Fix incidental console error spy that was unneeded

This commit is contained in:
Tom Ratcliffe 2024-04-04 11:52:33 +01:00 committed by Tom Ratcliffe
parent 6557f5a00e
commit 76c6e029a5

View File

@ -39,15 +39,11 @@ function getTestContext({ name, interval, items }: Partial<Playlist> = {}) {
}
describe('PlaylistNewPage', () => {
beforeEach(() => {
jest.spyOn(console, 'error').mockImplementation(() => {});
});
describe('when mounted', () => {
it('then header should be correct', () => {
it('then header should be correct', async () => {
getTestContext();
expect(screen.getByRole('heading', { name: /new playlist/i })).toBeInTheDocument();
expect(await screen.findByRole('heading', { name: /new playlist/i })).toBeInTheDocument();
});
});