react-native-fast-image/FastImage.test.js

23 lines
504 B
JavaScript
Raw Normal View History

2017-04-17 23:50:22 +00:00
import 'react-native'
import React from 'react'
import renderer from 'react-test-renderer'
import FastImage from './FastImage.js'
test('FastImage renders correctly.', () => {
2017-04-28 15:31:58 +00:00
const tree = renderer
.create(
<FastImage
source={{
uri: 'https://facebook.github.io/react/img/logo_og.png',
headers: {
token: 'someToken',
},
priority: FastImage.priority.high,
}}
/>,
)
.toJSON()
2017-04-17 23:50:22 +00:00
expect(tree).toMatchSnapshot()
})