Skip to content

Latest commit

 

History

History
28 lines (16 loc) · 1.09 KB

File metadata and controls

28 lines (16 loc) · 1.09 KB

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…