0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(experience): fix the ut randomly fail issue (#4913)

fix the ut randomly fail issue
This commit is contained in:
simeng-li 2023-11-20 18:49:49 +08:00 committed by GitHub
parent d0828834eb
commit 7379cfe4bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,15 +169,13 @@ describe('UsernamePasswordSignInForm', () => {
fireEvent.submit(submitButton);
});
act(() => {
void waitFor(() => {
expect(signInWithPasswordIdentifier).toBeCalledWith({
[type]:
type === SignInIdentifier.Phone
? `${getDefaultCountryCallingCode()}${identifier}`
: identifier,
password: 'password',
});
await waitFor(() => {
expect(signInWithPasswordIdentifier).toBeCalledWith({
[type]:
type === SignInIdentifier.Phone
? `${getDefaultCountryCallingCode()}${identifier}`
: identifier,
password: 'password',
});
});
});