Skip to content

Instantly share code, notes, and snippets.

@jesperronn
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesperronn/9344831 to your computer and use it in GitHub Desktop.
Save jesperronn/9344831 to your computer and use it in GitHub Desktop.
IntelliJ Jasmine tab triggers. Here are my definitions so that you can type ”it” and “desc” in your javascript test file.
Abbreviation: desc
Description: jasmine describe()
Applicable in: Javascript
Expand with: Default (Tab)
Template text:
describe('$SYSTEM_UNDER_TEST$', function() {
beforeEach(function() {
//First top level needs configure:
//jasmine.configure()
//example of setup:
//$('<p>added to sandbox</p>').appendTo('#sandbox');
$SETUP$
});
$CURSOR$
});
Abbreviation: it
Description: jasmine test it()
Applicable in: Javascript
Expand with: Default (Tab)
Template text:
it('should $DO_SOME_COOL_STUFF$', function() {
$ADD_SOME_COOL_CODE$
});
@jesperronn
Copy link
Author

To add it in IntelliJ, go to "Settings" > "Live Templates" (and add each as a new in group "JavaScript"

@darren-rose
Copy link

Awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment