Created
January 29, 2014 01:55
-
-
Save jackysee/8680381 to your computer and use it in GitHub Desktop.
AngularDirectiveTest.sublime-snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
'use strict'; | |
describe("${1}", function() { | |
beforeEach(module('${2}')); | |
var scope, compile, el; | |
beforeEach(inject(function(\$rootScope, \$compile){ | |
scope = \$rootScope.\$new(); | |
compile = \$compile; | |
})); | |
function createElement(tpl){ | |
el = angular.element(tpl); | |
compile(el)(scope); | |
scope.\$digest(); | |
} | |
it("should create element", function(){ | |
createElement("${3}"); | |
}); | |
});]]></content> | |
<tabTrigger>directivetest</tabTrigger> | |
<scope>source.js</scope> | |
<description>Angular Directive test</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment