Fix incidental console error spy that was unneeded

This commit is contained in:
Tom Ratcliffe
2024-04-18 09:04:53 +01:00
committed by Tom Ratcliffe
parent 6557f5a00e
commit 76c6e029a5
@@ -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();
});
});