init
This commit is contained in:
10
snippets/rjsx-mode/Jest/desc
Normal file
10
snippets/rjsx-mode/Jest/desc
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: edfbca80-e069-46cd-a034-b1523e57c4a4
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: describeBlock
|
||||
# key: desc
|
||||
# --
|
||||
|
||||
describe('$1', () => {
|
||||
$0
|
||||
})
|
||||
27
snippets/rjsx-mode/Jest/snrtest
Normal file
27
snippets/rjsx-mode/Jest/snrtest
Normal file
@@ -0,0 +1,27 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: de59c777-b0cb-40b1-903a-a006987fef2e
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: setupReactNativeTestWithRedux
|
||||
# key: snrtest
|
||||
# --
|
||||
|
||||
import 'react-native'
|
||||
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()
|
||||
})
|
||||
})
|
||||
21
snippets/rjsx-mode/Jest/sntest
Normal file
21
snippets/rjsx-mode/Jest/sntest
Normal file
@@ -0,0 +1,21 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: fae867ad-ec86-4eff-bb90-a9bb07040eb7
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: setupReactNativeTest
|
||||
# key: sntest
|
||||
# --
|
||||
|
||||
import 'react-native'
|
||||
import React from 'react'
|
||||
import renderer from 'react-test-renderer'
|
||||
|
||||
import ${1:${TM_FILENAME_BASE}} from '../${1:${TM_FILENAME_BASE}}'
|
||||
|
||||
describe('<${1:${TM_FILENAME_BASE}} />', () => {
|
||||
const defaultProps = {}
|
||||
const wrapper = renderer.create(<${1:${TM_FILENAME_BASE}} {...defaultProps} />)
|
||||
|
||||
test('render', () => {
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
26
snippets/rjsx-mode/Jest/srtest
Normal file
26
snippets/rjsx-mode/Jest/srtest
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- 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()
|
||||
})
|
||||
})
|
||||
20
snippets/rjsx-mode/Jest/stest
Normal file
20
snippets/rjsx-mode/Jest/stest
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: ddc5cfd4-640f-4fb3-9f85-667de1e4a345
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: setupTest
|
||||
# key: stest
|
||||
# --
|
||||
|
||||
import React from 'react'
|
||||
import renderer from 'react-test-renderer'
|
||||
|
||||
import { ${1:${TM_FILENAME_BASE}} } from '../${1:${TM_FILENAME_BASE}}'
|
||||
|
||||
describe('<${1:${TM_FILENAME_BASE}} />', () => {
|
||||
const defaultProps = {}
|
||||
const wrapper = renderer.create(<${1:${TM_FILENAME_BASE}} {...defaultProps} />)
|
||||
|
||||
test('render', () => {
|
||||
expect(wrapper).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
10
snippets/rjsx-mode/Jest/test
Normal file
10
snippets/rjsx-mode/Jest/test
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: 190f78b4-17ec-429e-aaf1-3231726ca580
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: testBlock
|
||||
# key: test
|
||||
# --
|
||||
|
||||
test('should $1', () => {
|
||||
$0
|
||||
})
|
||||
10
snippets/rjsx-mode/Jest/tit
Normal file
10
snippets/rjsx-mode/Jest/tit
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*- mode: snippet -*-
|
||||
# uuid: 96dcd16f-ee34-4832-8637-6610819df6ba
|
||||
# contributor: Jimmy Yuen Ho Wong <wyuenho@gmail.com>
|
||||
# name: itBlock
|
||||
# key: tit
|
||||
# --
|
||||
|
||||
it('should $1', () => {
|
||||
$0
|
||||
})
|
||||
Reference in New Issue
Block a user