Skip to content

Instantly share code, notes, and snippets.

@andrewlinfoot
Created February 11, 2018 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewlinfoot/68b6e924728dbb7efc98229e773f1c98 to your computer and use it in GitHub Desktop.
Save andrewlinfoot/68b6e924728dbb7efc98229e773f1c98 to your computer and use it in GitHub Desktop.
describe('<LoginPage />', () => {
it('should render the login form', ...
describe('when the login button is clicked', ...
it('should check for a valid email', ...
describe('when the email in invalid', ...
it('should show a validation error', ...
describe('when the email is valid', ...
it('should try to log the user in', ...
it('should show a loading spinner', ...
describe('when login succeeds', ...
it('should store the auth token in local storage', ...
it('should log an event in Google Analytics', ...
it('should redirect the user to their NewsFeed', ...
describe('when login fails', ...
it('should hide the loading spinner', ...
it('should show an error message', ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment