|
|
- # -*- mode: snippet -*-
- # uuid: 168f89c0-3e0b-4868-b090-50f6fc79d074
- # contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
- # name: setupReactComponentTestWithRedux
- # key: srtest
- # --
-
- import React from 'react'
- import renderer from 'react-test-renderer'
- import { Provider } from 'react-redux'
-
- import store from 'src/store'
- import { ${1:${TM_FILENAME_BASE}} } from '../${1:${TM_FILENAME_BASE}}'
-
- describe('<${1:${TM_FILENAME_BASE}} />', () => {
- const defaultProps = {}
- const wrapper = renderer.create(
- <Provider store={store}>
- <${1:${TM_FILENAME_BASE}} {...defaultProps} />
- </Provider>,
- )
-
- test('render', () => {
- expect(wrapper).toMatchSnapshot()
- })
- })
|