Skip to content

Commit

Permalink
Add assert snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
zenorocha committed Aug 14, 2013
1 parent 1fc0321 commit d6f7a76
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 15 deletions.
50 changes: 35 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -215,6 +227,12 @@ module.exports = ${1}
process.exit(${1:code});
```
### [re] require
```javascript
require('${1:module}');
```
## Roadmap
* Add BDD snippets
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions node-assertDeepEqual.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
assert.deepEqual(${1:actual}, ${2:expected});
]]></content>
<tabTrigger>asd</tabTrigger>
<scope>source.js</scope>
<description>assert.deepEqual</description>
</snippet>
8 changes: 8 additions & 0 deletions node-assertEqual.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
assert.equal(${1:actual}, ${2:expected});
]]></content>
<tabTrigger>ase</tabTrigger>
<scope>source.js</scope>
<description>assert.equal</description>
</snippet>
8 changes: 8 additions & 0 deletions node-assertNotEqual.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[
assert.notEqual(${1:actual}, ${2:expected});
]]></content>
<tabTrigger>asn</tabTrigger>
<scope>source.js</scope>
<description>assert.notEqual</description>
</snippet>

0 comments on commit d6f7a76

Please sign in to comment.