Skip to content

Instantly share code, notes, and snippets.

@peregrinogris
Created April 26, 2017 17:28
Show Gist options
  • Save peregrinogris/ead98db8182ae03fe796b7ae66eb35c2 to your computer and use it in GitHub Desktop.
Save peregrinogris/ead98db8182ae03fe796b7ae66eb35c2 to your computer and use it in GitHub Desktop.
'.source.js':
'i18n translation singular':
'prefix': 'i18'
'body': '{i18n.gettext(\'$1\')}$2'
'i18n translation plural':
'prefix': 'i18n'
'body': '{i18n.ngettext(\'$1\', \'$2\', ${3:idx})}$4'
'New test suite':
'prefix': 'newtest'
'body': """
/* global describe, it */
/* eslint-disable no-unused-expressions */
const React = require('react');
const { expect } = require('chai');
const { shallow } = require('enzyme');
const $1 = require('./$1');
describe('<$1 />', () => {
it('should have a test', () => {$2});
});
"""
'Mocha test case':
'prefix': 'it'
'body': 'it(\'$1\', () => {$2});$3'
'Mocha test description':
'prefix': 'desc'
'body': 'describe(\'$1\', () => {$2});'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment