Skip to content

Instantly share code, notes, and snippets.

@ivan-marquez
Created June 13, 2019 20:35
Show Gist options
  • Save ivan-marquez/611f2e442cb84a81911f213822f5f686 to your computer and use it in GitHub Desktop.
Save ivan-marquez/611f2e442cb84a81911f213822f5f686 to your computer and use it in GitHub Desktop.
VS Code snippet for BDD unit test with Jest
{
"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