Syntax Highlighter and Snippets for mocha (node.js)
Switch branches/tags
Nothing to show
Pull request Compare This branch is even with lennart:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
DetectMochaTest.py
Mocha.JSON-tmLanguage
Mocha.tmLanguage
README.md
after().sublime-snippet
afterEach().sublime-snippet
ait().sublime-snippet
before().sublime-snippet
beforeEach().sublime-snippet
describe().sublime-snippet
it().sublime-snippet
package-metadata.json
repositories.json

README.md

sublime-node-mocha

SublimeText 2 Snippets and Syntax Highlighter for the testing framework mocha. Although the name implies node.js, mocha works as well in the browser.

WARNING: this is an early release of, expect bugs…

Installation

git clone git://github.com/lennart/sublime-node-mocha.git <path-to-your-packages-folder>/Mocha

Or use the Sublime Text 2 Package Manager

Usage

Given your tests lie within the test folder relative to the root of your project, sublime-node-mocha will automatically use an enhanced javascript syntax to highlight describe and it blocks as well as specific calls like done() or beforeEach(...).

Within a test file you can use the following snippets:

  • it<tab> => it("should behave like", function() { ... });

  • ait<tab> => it("should behave like", function(done) { ...; done(); });

  • describe<tab> => describe("a trait", function() { ...});

more might follow…