Skip to content

Instantly share code, notes, and snippets.

@Jero786
Last active June 15, 2019 15:17
Show Gist options
  • Save Jero786/cf0cd7726348f6ba2a17f65b85d8fb24 to your computer and use it in GitHub Desktop.
Save Jero786/cf0cd7726348f6ba2a17f65b85d8fb24 to your computer and use it in GitHub Desktop.
Webstorm - Live Templates
// rt
render(<$ELEMENT$ $ATTRIBUTE$='$TEXT$'/>).getByText(/$TEXT$/);
$END$
// itrt
it('should render properly the $ATTRIBUTE$ value', () => {
render(<$ELEMENT$ $ATTRIBUTE$='$TEXT$'/>).getByText(/$TEXT$/);
});
$END$
// imi
import {fromJS} from 'immutable';
$END$
// clog
console.log('$TEXT$');$END$
// clogs
console.log('$TEXT$ LOG ------> ' + JSON.stringify($OBJ$));$END$
// jst
JSON.stringify($TEXT$);$END$
// TESTING ---------------------------------
// Reducer
it('should $NAME$', () => {
const initialState = fromJS({});
const result = reducer(initialState, Actions.$ACTION$());
expect(result.get('$FIELD$')$EXTRA_OPT_FIELD$).toBe($EXPECT$);
});
$END$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment