Skip to content

Instantly share code, notes, and snippets.

@cmstead
Last active May 3, 2017 16:03
Show Gist options
  • Save cmstead/e4fd9a015a748c8b9ff7538c87391e3d to your computer and use it in GitHub Desktop.
Save cmstead/e4fd9a015a748c8b9ff7538c87391e3d to your computer and use it in GitHub Desktop.
My test snippets for VS Code
{
"Mocha describe": {
"prefix": "mdesc",
"body": [
"describe('$1', function () {",
"\t$2",
"});"
],
"description": "Mocha describe block"
},
"Mocha before each": {
"prefix": "mbefore",
"body": [
"beforeEach(function () {",
"\t$1",
"});"
],
"description": "Mocha before each setup block"
},
"Mocha after each": {
"prefix": "mafter",
"body": [
"afterEach(function () {",
"\t$1",
"});"
],
"description": "Mocha after each teardown block"
},
"Mocha assert -- equal": {
"prefix": "meq",
"body": [
"assert.equal($1, $2);"
],
"description": "Mocha equality assertion"
},
"Mocha assert -- throws": {
"prefix": "mthrows",
"body": [
"assert.throws($1, '$2');"
],
"description": "Mocha method throws assertion"
},
"Mocha assert -- doesNotThrow": {
"prefix": "mdnt",
"body": [
"assert.doesNotThrow($1)"
],
"description": "Mocha method does not throw assertion"
},
"Mocha it": {
"prefix": "mit",
"body": [
"it('$1', function () {",
"\t$2",
"});"
],
"description": "Mocha it block"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment