Skip to content

Instantly share code, notes, and snippets.

@whtswrng
Last active December 9, 2018 12:00
Show Gist options
  • Save whtswrng/dbf6dfe9f2f4908d5a0c955d30a9d96f to your computer and use it in GitHub Desktop.
Save whtswrng/dbf6dfe9f2f4908d5a0c955d30a9d96f to your computer and use it in GitHub Desktop.
describe('when try to log out user', () => {
describe('and when is user logged in', () => {
beforeEach(async () => {
// ...
isUserLoggedIn = createStub().resolves(true);
logOutAction = createSpy();
// ...
});
it('should log user out', () => {
expect(logOutAction).toHaveBeenCalledTimes(1);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment