Last active
January 24, 2021 21:29
-
-
Save bmdalex/1183a93ae93457742e9d50696a184514 to your computer and use it in GitHub Desktop.
DO group tests by behaviours (BDT) and preconditions
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
describe('when the user submits a valid form', () => { | |
beforeEach(() => { ... }) | |
it('should enable the submit button', () => { ... }) | |
it('should register the user by calling external API', () => { ... }) | |
}) | |
describe('when the user submits an invalid form', () => { | |
beforeEach(() => { ... }) | |
it('should disable the submit button', () => { ... }) | |
describe('by using an invalid email', () => { | |
beforeEach(() => { ... }) | |
it('should log the appropriate error', () => { ... }) | |
it('should not register the user', () => { ... }) | |
}) | |
describe('by not accepting terms and conditions', () => { | |
beforeEach(() => { ...}) | |
it('should log the appropriate error', () => { ... }) | |
it('should not register the user', () => { ... }) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment