From d6f7a769aebfaf8d9b3a65c13a2188b4af7c0811 Mon Sep 17 00:00:00 2001 From: Zeno Rocha Date: Wed, 14 Aug 2013 18:23:14 -0300 Subject: [PATCH] Add assert snippets --- README.md | 50 +++++++++++++++++++--------- node-assertDeepEqual.sublime-snippet | 8 +++++ node-assertEqual.sublime-snippet | 8 +++++ node-assertNotEqual.sublime-snippet | 8 +++++ 4 files changed, 59 insertions(+), 15 deletions(-) create mode 100644 node-assertDeepEqual.sublime-snippet create mode 100644 node-assertEqual.sublime-snippet create mode 100644 node-assertNotEqual.sublime-snippet diff --git a/README.md b/README.md index 52a944c..4edced1 100644 --- a/README.md +++ b/README.md @@ -135,18 +135,6 @@ ${1:document}.getElementsByClassName('${2:class}'); ${1:document}.getElementsByTagName('${2:tag}'); ``` -### [qs] querySelector - -```javascript -${1:document}.querySelector('${2:selector}'); -``` - -### [qsa] querySelectorAll - -```javascript -${1:document}.querySelectorAll('${2:selector}'); -``` - ### [ga] getAttribute ```javascript @@ -177,6 +165,18 @@ ${1:document}.innerHTML = '${2}'; ${1:document}.textContent = '${2}'; ``` +### [qs] querySelector + +```javascript +${1:document}.querySelector('${2:selector}'); +``` + +### [qsa] querySelectorAll + +```javascript +${1:document}.querySelectorAll('${2:selector}'); +``` + ## Function ### [fu] function @@ -197,10 +197,22 @@ ${1:ClassName}.prototype.${2:methodName} = function(${3:arguments}) { ## NodeJS -### [re] require +### [ase] assert.equal ```javascript -require('${1:module}'); +assert.equal(${1:actual}, ${2:expected}); +``` + +### [asd] assert.deepEqual + +```javascript +assert.deepEqual(${1:actual}, ${2:expected}); +``` + +### [asn] assert.notEqual + +```javascript +assert.notEqual(${1:actual}, ${2:expected}); ``` ### [me] module.exports @@ -215,6 +227,12 @@ module.exports = ${1} process.exit(${1:code}); ``` +### [re] require + +```javascript +require('${1:module}'); +``` + ## Roadmap * Add BDD snippets @@ -229,7 +247,9 @@ process.exit(${1:code}); ## History -* v0.1.0 August 14, 2013 +* [v0.1.1](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.1) August 14, 2013 + * Added NodeJS assert snippets +* [v0.1.0](https://github.com/zenorocha/sublime-snippets-js/releases/tag/0.1.0) August 14, 2013 * Added console and function snippets * Added DOM manipulation snippets * Added NodeJS snippets diff --git a/node-assertDeepEqual.sublime-snippet b/node-assertDeepEqual.sublime-snippet new file mode 100644 index 0000000..bca20b9 --- /dev/null +++ b/node-assertDeepEqual.sublime-snippet @@ -0,0 +1,8 @@ + + + asd + source.js + assert.deepEqual + \ No newline at end of file diff --git a/node-assertEqual.sublime-snippet b/node-assertEqual.sublime-snippet new file mode 100644 index 0000000..21c8c6d --- /dev/null +++ b/node-assertEqual.sublime-snippet @@ -0,0 +1,8 @@ + + + ase + source.js + assert.equal + \ No newline at end of file diff --git a/node-assertNotEqual.sublime-snippet b/node-assertNotEqual.sublime-snippet new file mode 100644 index 0000000..af360c5 --- /dev/null +++ b/node-assertNotEqual.sublime-snippet @@ -0,0 +1,8 @@ + + + asn + source.js + assert.notEqual + \ No newline at end of file