Last active
September 3, 2019 15:27
-
-
Save pauloptimizely/2aa4bc08eecebcac799a192813436600 to your computer and use it in GitHub Desktop.
VSCode User Snippets
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
{ | |
"log": { | |
"prefix": "log", | |
"body": "console.log('${0}');", | |
"description": "Log output to console" | |
}, | |
"import": { | |
"prefix": "impo", | |
"body": "import ${1} from '${2}';${0}", | |
"description": "Creates es6 import" | |
}, | |
"require": { | |
"prefix": "req", | |
"body": "const ${1} = require('${2}');\n${0}", | |
"description": "Creates es6 require" | |
}, | |
"constructor": { | |
"prefix": "con", | |
"body": "constructor(${1}) {\n\tsuper(${1});\n\t${0}\n}", | |
"description": "Add default constructor in a class in ES6 syntax" | |
}, | |
"method": { | |
"prefix": "meth", | |
"body": "${1:methodName} = (${2:params}) => {\n\t${0}\n}", | |
"description": "Creates a method inside a class in ES6 syntax" | |
}, | |
"function": { | |
"prefix": "fu", | |
"body": "function() {\n\t${0}\n}", | |
"description": "Creates a es5 function" | |
}, | |
"describe": { | |
"prefix": "desc", | |
"body": "describe('${1}', function() {\n\t${0}\n});" | |
}, | |
"before": { | |
"prefix": "be", | |
"body": "beforeEach(function() {\n\t${0}\n});" | |
}, | |
"after": { | |
"prefix": "af", | |
"body": "afterEach(function() {\n\t${0}\n});" | |
}, | |
"it": { | |
"prefix": "it", | |
"body": "it('should ${1}');${0}", | |
"description": "Creates an it block." | |
}, | |
"toBe": { | |
"prefix": "to", | |
"body": "expect(${1}).toBe(${0});", | |
"description": "Creates a toBe Jest assertion" | |
}, | |
"toBeTrue": { | |
"prefix": "tot", | |
"body": "expect(${0}).toBe(true);", | |
"description": "Creates a toBe Jest true assertion" | |
}, | |
"toEqual": { | |
"prefix": "toe", | |
"body": "expect(${1}).toEqual(${0});", | |
"description": "Creates a toEqual Jest assertion" | |
}, | |
"toExist": { | |
"prefix": "tox", | |
"body": "expect(${0}.exists()).toBe(true);", | |
"description": "Create an assertion that checks if component exists" | |
}, | |
"find": { | |
"prefix": "find", | |
"body": "component.find('${1}')${0}", | |
"description": "Creates a Enzyme find function" | |
}, | |
"find shorthand": { | |
"prefix": "fin", | |
"body": "component.find('${1}')${0}", | |
"description": "Creates a Enzyme find function" | |
}, | |
"find test section": { | |
"prefix": "fin", | |
"body": "component.find('[data-test-section=\"${0}\"]');", | |
"description": "Creates a Enzyme find function" | |
}, | |
"shallow": { | |
"prefix": "shal", | |
"body": "component = shallow(\n\t<${1:Component}\n\t\t${0:props}\n\t/>\n);" | |
}, | |
"mount": { | |
"prefix": "mount", | |
"body": "component = mount(\n\t<${1:Component}\n\t\t${0:props}\n\t/>\n);" | |
}, | |
"unmount": { | |
"prefix": "unmount", | |
"body": "component.unmount();" | |
}, | |
"cwd": { | |
"prefix": "cwd", | |
"body": "${cwd}" | |
}, | |
"called once": { | |
"prefix": "call", | |
"body": "sinon.assert.calledOnce(${0});" | |
}, | |
"called with": { | |
"prefix": "callw", | |
"body": "sinon.assert.calledWith(${0});" | |
}, | |
"called with match": { | |
"prefix": "callm", | |
"body": "sinon.assert.calledWithMatch(${0});" | |
}, | |
"match": { | |
"prefix": "match", | |
"body": "sinon.match(${0})", | |
}, | |
"stub": { | |
"prefix": "stub", | |
"body": "sinon.stub(${0}).returns();" | |
}, | |
"spy": { | |
"prefix": "spy", | |
"body": "sinon.spy();" | |
} | |
} |
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
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"telemetry.enableTelemetry": false, | |
"files.trimTrailingWhitespace": true, | |
"editor.tabSize": 2, | |
"editor.renderWhitespace": "all", | |
"workbench.editor.tabSizing": "shrink", | |
"editor.parameterHints.enabled": false, | |
"editor.minimap.enabled": false, | |
"breadcrumbs.enabled": false, | |
"workbench.statusBar.visible": true, | |
"workbench.colorCustomizations": { | |
"statusBar.background" : "#303030", | |
"statusBar.noFolderBackground" : "#222225", | |
"statusBar.debuggingBackground": "#511f1f" | |
}, | |
"workbench.statusBar.feedback.visible": false, | |
"workbench.colorTheme": "Visual Studio Dark", | |
"typescript.suggest.autoImports": false , | |
"javascript.suggest.autoImports": false, | |
"workbench.activityBar.visible": false, | |
"editor.acceptSuggestionOnCommitCharacter": false, | |
"extensions.ignoreRecommendations": true, | |
"clock.dateFormat": "mmmm dS, dddd - hh:MM TT", | |
"files.autoSave": "afterDelay" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment