Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
678 B

5 years ago
  1. # -*- mode: snippet -*-
  2. # uuid: 168f89c0-3e0b-4868-b090-50f6fc79d074
  3. # contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
  4. # name: setupReactComponentTestWithRedux
  5. # key: srtest
  6. # --
  7. import React from 'react'
  8. import renderer from 'react-test-renderer'
  9. import { Provider } from 'react-redux'
  10. import store from 'src/store'
  11. import { ${1:${TM_FILENAME_BASE}} } from '../${1:${TM_FILENAME_BASE}}'
  12. describe('<${1:${TM_FILENAME_BASE}} />', () => {
  13. const defaultProps = {}
  14. const wrapper = renderer.create(
  15. <Provider store={store}>
  16. <${1:${TM_FILENAME_BASE}} {...defaultProps} />
  17. </Provider>,
  18. )
  19. test('render', () => {
  20. expect(wrapper).toMatchSnapshot()
  21. })
  22. })