Skip to content

Instantly share code, notes, and snippets.

@vernak2539
Created July 30, 2015 16:31
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 vernak2539/a234c0412432367229ba to your computer and use it in GitHub Desktop.
Save vernak2539/a234c0412432367229ba to your computer and use it in GitHub Desktop.
Atom Test Snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
# 'Console log':
# 'prefix': 'log'
# 'body': 'console.log $1'
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it here:
# https://github.com/bevry/cson#what-is-cson
'.source.js':
'amodule':
'prefix': 'amodule'
'body': """angular.module('', []);"""
'iife':
'prefix': 'iife'
'body': """
(function() {
'use strict';
angular
.module('')
.whatever('', [
function() {
}
]);
})();
"""
'describe':
'prefix': 'testd'
'body': """
describe('', function() {
it('should', function() {
});
});
"""
'it':
'prefix': 'testit'
'body': """
it('should', function() {
});
"""
'before':
'prefix': 'before'
'body': """
beforeEach(function() {
module('');
});
"""
'test':
'prefix': 'test'
'body': """
(function() {
'use strict';
describe('', function() {
var test;
beforeEach(function() {
module('facebook');
});
beforeEach(inject(function($injector) {
test = $injector.get('test');
}));
describe('', function() {
it('should', function() {
});
});
});
})();
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment