test: improve resiliency again (#348)

This commit is contained in:
Nolan Lawson 2023-06-18 13:10:44 -07:00 committed by GitHub
parent ad490854ce
commit a7ad168b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -6,13 +6,16 @@ import { getByRole, waitFor } from '@testing-library/dom'
describe('errors', () => {
let errorSpy
beforeEach(() => {
basicBeforeEach()
beforeEach(async () => {
await basicBeforeEach()
errorSpy = jest.spyOn(global.console, 'error').mockImplementation()
await tick(40)
})
afterEach(async () => {
await tick(40)
await basicAfterEach()
errorSpy.mockRestore()
await tick(40)
})
// seems not possible to do