- Under
preferences
->user snippets
selectjavascript
. - Copy & paste
javascript.json
contents
-
-
Save Chuyakova/3cfb70ae501541428ecec0fcf24729c3 to your computer and use it in GitHub Desktop.
VS Code snippet for tests (Jest, Mocha)
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
{ | |
"begin test": { | |
"prefix": "tdd", | |
"body": [ | |
"describe(\"\", function(){", | |
"\tit(\"\", function(){", | |
"\t\texpect().toEqual();", | |
"\t});", | |
"});" | |
], | |
"description": "New test file starter" | |
}, | |
"it": { | |
"body": "it('${1:should }', () => {\n\t$0\n});", | |
"description": "Creates an it block", | |
"prefix": "it" | |
}, | |
"describe": { | |
"body": "describe('${1:Name of the group}', () => {\n\t$0\n});", | |
"description": "Creates a describe block", | |
"prefix": "desc" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment