Skip to content

Commit

Permalink
Add test snippet for classes as testf
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunsaker committed Jun 9, 2018
1 parent 11e2d0c commit 7be8de5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,27 @@
"});",
"/* eslint-enable */"
]
},
"Blank functional test": {
"prefix": "testf",
"body": [
"/* eslint-disable import/first */",
"import React from 'react';",
"import renderer from 'react-test-renderer';",
"$2",
"import $1 from '../$1';",
"$2",
"it('renders a $1', () => {",
" const component = renderer.create(<$1 />);",
" expect(component).toMatchSnapshot();",
"$2",
" const instance = component.getInstance();",
"});",
"$2",
"it('renders a $1 with no props', () => {",
" expect(renderer.create(<$1 />)).toMatchSnapshot();",
"});",
"/* eslint-enable */"
]
}
}

0 comments on commit 7be8de5

Please sign in to comment.