For Sublime Text 3.
- Open Command Palette →
Package Control: Add Repository→https://github.com/phts/Snippets - Open Command Palette →
Package Control: Install Package→Snippets
return … if …return … unless …
after … do … endallow(…).tobefore … do … endcontext '…' do … enddescribe '…' do … enddescribed_classexpect(…).toit '…' do … endit { should … }it_behaves_like '…'its(…) { should … }let(…) do … endlet(…) { … }pending '…'receive(…).with(…).and_return(…)shared_examples '…' do |…| … endshould_receive(…).with(…).and_return(…)stub(…).with(…).and_return(…)subject { … }
… => …constructor(…) { … }constructor(props) { … }export default …export … from …export …function … { … }if (…) return …;if (…) { … }import … from …import {…} from …
import … from './…'import styled from 'styled-components'- component template
- jest test template
- styled-component template
@Component({ … })TestBed.configureTestingModule({ … })- import testing stuff template
afterAll(() => { … })afterEach(() => { … })beforeAll(() => { … })beforeEach(() => { … })describe(…, () => { … })describe('when …', () => { … })expect(…).toEqual(…)await expect(…).resolves.toEqual(…)it(…, () => { … })jest.mock(…)
$(…)$(function() { … })on(…, …, function() { … });