Skip to content

Instantly share code, notes, and snippets.

@sean-codes
Last active January 15, 2018 03:55
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 sean-codes/2277978dd85d1bd9498d679c9de26b51 to your computer and use it in GitHub Desktop.
Save sean-codes/2277978dd85d1bd9498d679c9de26b51 to your computer and use it in GitHub Desktop.
Atom Snippets: Tape
# 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'
#
# Each scope (e.g. '.source.coffee' above) can only be declared once.
#
# This file uses CoffeeScript Object Notation (CSON).
# If you are unfamiliar with CSON, you can read more about it in the
# Atom Flight Manual:
# http://flight-manual.atom.io/using-atom/sections/basic-customization/#_cson
'.source.js':
'tape.skip':
'prefix': 'tape.skip'
'body': 'tape.skip(${1:name}, ${2:callback})'
'tape.onFinish':
'prefix': 'tape.onFinish'
'body': 'tape.onFinish(${1:fn})'
'tape.onFailure':
'prefix': 'tape.onFailure'
'body': 'tape.onFailure(${1:fn})'
'tape':
'prefix': 'tape'
'body': 'tape(${1:name}, (test) => {${2:fn}})'
'test.plan':
'prefix': 'test.plan'
'body': 'test.plan(${1:count})'
'test.end':
'prefix': 'test.end'
'body': 'test.end(${1:err})'
'test.pass':
'prefix': 'test.pass'
'body': 'test.pass(${1:message})'
'test.fail':
'prefix': 'test.fail'
'body': 'test.fail({$1:message})'
'test.timeoutAfter':
'prefix': 'test.timeoutAfter'
'body': 'test.timeoutAfter(${1:ms})'
'test.skip':
'prefix': 'test.skip'
'body': 'test.skip(${1:message})'
'test.ok':
'prefix': 'test.ok'
'body': 'test.ok(${1:value}, ${2:msg})'
'test.notOk':
'prefix': 'test.notOk'
'body': 'test.notOk(${1:value}, ${2:msg})'
'test.error':
'prefix': 'test.error'
'body': 'test.error(${1:err}, ${2:msg})'
'test.equal':
'prefix': 'test.equal'
'body': 'test.equal(${1:actual}, ${2:expected}, ${3:msg})'
'test.notEqual':
'prefix': 'test.notEqual'
'body': 'test.notEqual(${1:actual}, ${2:expected}, ${3:msg})'
'test.notEqual':
'prefix': 'test.notEqual'
'body': 'test.notEqual(${1:actual}, ${2:expected}, ${3:msg})'
'test.deepEqual':
'prefix': 'test.deepEqual'
'body': 'test.deepEqual(${1:actual}, ${2:expected}, ${3:msg})'
'test.notDeepEqual':
'prefix': 'test.notDeepEqual'
'body': 'test.notDeepEqual(${1:actual}, ${2:expected}, ${3:msg})'
'test.looseDeepEqual':
'prefix': 'test.looseDeepEqual'
'body': 'test.looseDeepEqual(${1:actual}, ${2:expected}, ${3:msg})'
'test.throws':
'prefix': 'test.throws'
'body': 'test.throws(${1:fn}, ${2:expected}, ${3:msg})'
'test.doesNotThrow':
'prefix': 'test.throws'
'body': 'test.throws(${1:fn}, ${2:expected}, ${3:msg})'
'test.comment':
'prefix': 'test.comment'
'body': 'test.comment(${1:message})'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment