Created
January 24, 2021 21:31
-
-
Save bmdalex/9d33b9acea01b47b19a9e4daa7a4c139 to your computer and use it in GitHub Desktop.
DO split tests using the frameworks' capabilities
This file contains hidden or 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
describe('when the user submits a valid form', () => { | |
beforeEach(() => { | |
/* | |
* preconditions | |
*/ | |
}) | |
it('should enable the submit button', () => { | |
expect(getFormSubmitButton(wrapper).attributes('disabled')).toBe(undefined) | |
}) | |
it('should register the user by calling external API', () => { | |
expect($auth.registerUser).toHaveBeenCalledWith({ email: validEmail }) | |
}) | |
it('should emit the "register-update" event', () => { | |
expect(wrapper.emitted()['register-update'][0]).toBe(registerUserResponse) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment