Skip to content

Instantly share code, notes, and snippets.

@jackysee
Created January 29, 2014 01:56
Show Gist options
  • Save jackysee/8680395 to your computer and use it in GitHub Desktop.
Save jackysee/8680395 to your computer and use it in GitHub Desktop.
AngularControllerTest.sublime-snippet
<snippet>
<content><![CDATA['use strict';
describe("Controller : ${1}", function() {
beforeEach(module('${2}'));
var ctrl, scope;
beforeEach(inject(function(\$controller, \$rootScope){
scope = \$rootScope.\$new();
ctrl = \$controller("${3}", {
\$scope: scope
});
}));
it("should be defined", function() {
expect(ctrl).toBeDefined();
});
});]]></content>
<tabTrigger>ctrltest</tabTrigger>
<scope>source.js</scope>
<description>Angular Controller test</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment