Created
June 13, 2019 20:35
-
-
Save ivan-marquez/611f2e442cb84a81911f213822f5f686 to your computer and use it in GitHub Desktop.
VS Code snippet for BDD unit test with Jest
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
{ | |
"BDD Unit Test": { | |
"prefix": "bdd", | |
"body": [ | |
"describe('Given $1', () => {", | |
" afterEach(() => {", | |
" jest.resetAllMocks();", | |
" });", | |
" describe('when $2', () => {", | |
" test('then $3', async () => {", | |
" $0expect(true).toBe(true);", | |
" });", | |
" });", | |
"});" | |
], | |
"description": "Unit test following BDD methodology." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment