mirror of
https://github.com/coder/coder.git
synced 2026-10-16 06:37:58 +08:00
fix: resolve test
This commit is contained in:
@@ -65,10 +65,10 @@ describe("AccountPage", () => {
|
||||
renderWithAuth(<AccountPage />);
|
||||
await fillAndSubmitForm();
|
||||
|
||||
const errorMessage = await screen.findByText(
|
||||
const errorMessages = await screen.findAllByText(
|
||||
"Username is already in use",
|
||||
);
|
||||
expect(errorMessage).toBeDefined();
|
||||
expect(errorMessages.length).toBeGreaterThanOrEqual(2);
|
||||
expect(API.updateProfile).toBeCalledTimes(1);
|
||||
expect(API.updateProfile).toBeCalledWith("me", newData);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user