-
-
Save gasserkl/6119deda1f0a76f9f79e6ed26adc2b18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("should return the user information upon successful login", async () => { | |
// when: | |
const { result } = renderHook(() => useLogin()); | |
act(() => result.current.onLogin("admin", "admin")); | |
// then: | |
await waitFor(() => expect(result.current.isLoginError).toBeFalsy()); | |
await waitFor(() => expect(result.current.loggedInUsername).toEqual("admin")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment