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.

26 lines
695 B

4 years ago
  1. # -*- mode: snippet -*-
  2. # uuid: de59c777-b0cb-40b1-903a-a006987fef2e
  3. # contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
  4. # name: setupReactNativeTestWithRedux
  5. # key: snrtest
  6. # --
  7. import 'react-native'
  8. import React from 'react'
  9. import renderer from 'react-test-renderer'
  10. import { Provider } from 'react-redux'
  11. import store from 'src/store'
  12. import ${1:${TM_FILENAME_BASE}} from '../${1:${TM_FILENAME_BASE}}'
  13. describe('<${1:${TM_FILENAME_BASE}} />', () => {
  14. const defaultProps = {}
  15. const wrapper = renderer.create(
  16. <Provider store={store}>
  17. <${1:${TM_FILENAME_BASE}} {...defaultProps} />
  18. </Provider>,
  19. )
  20. test('render', () => {
  21. expect(wrapper).toMatchSnapshot()
  22. })
  23. })