diff --git a/app/soapbox/features/verification/__tests__/registration.test.tsx b/app/soapbox/features/verification/__tests__/registration.test.tsx index e706b71c0..8dfe3083f 100644 --- a/app/soapbox/features/verification/__tests__/registration.test.tsx +++ b/app/soapbox/features/verification/__tests__/registration.test.tsx @@ -75,7 +75,10 @@ describe('', () => { fireEvent.submit(screen.getByTestId('button'), { preventDefault: () => {} }); }); - expect(screen.getByTestId('toast')).toHaveTextContent(/this username is unavailable/i); + await waitFor(() => { + expect(screen.getByTestId('toast')).toHaveTextContent(/this username is unavailable/i); + }); + }); it('handles generic errors', async() => {