Fix tests. Update dependencies and format command.

This commit is contained in:
Dylan Vann 2018-03-11 19:19:39 -04:00
parent 753420bb17
commit 04865c210a
4 changed files with 949 additions and 555 deletions

View File

@ -53,7 +53,7 @@ exports[`Renders a normal Image when not passed a uri. 1`] = `
resizeMode="cover" resizeMode="cover"
source={ source={
Object { Object {
"testUri": "../../../server/pictures/jellyfish.gif", "testUri": "../../../react-native-fast-image-example-server/pictures/jellyfish.gif",
} }
} }
style={ style={

View File

@ -1,7 +1,7 @@
import { StyleSheet } from 'react-native' import { StyleSheet } from 'react-native'
import React from 'react' import React from 'react'
import renderer from 'react-test-renderer' import renderer from 'react-test-renderer'
import FastImage from './FastImage.js' import FastImage from './index.js'
const style = StyleSheet.create({ image: { width: 44, height: 44 } }) const style = StyleSheet.create({ image: { width: 44, height: 44 } })
@ -28,7 +28,7 @@ test('Renders a normal Image when not passed a uri.', () => {
const tree = renderer const tree = renderer
.create( .create(
<FastImage <FastImage
source={require('./server/pictures/jellyfish.gif')} source={require('./react-native-fast-image-example-server/pictures/jellyfish.gif')}
style={style.image} style={style.image}
/>, />,
) )

View File

@ -31,11 +31,11 @@
"url": "git+https://github.com/DylanVann/react-native-fast-image.git" "url": "git+https://github.com/DylanVann/react-native-fast-image.git"
}, },
"scripts": { "scripts": {
"format": "prettier --write --no-semi --single-quote --trailing-comma all ./FastImage.js ./example/*.js ./example/fastImage/*.js ./server/*.js", "format": "prettier --write --no-semi --single-quote --trailing-comma all ./index.js ./example/*.js ./example/fastImage/*.js ./server/*.js",
"prepare": "git submodule update --init --recursive", "prepare": "git submodule update --init --recursive",
"test": "yarn run test:pretty && yarn run test:jest", "test": "yarn run test:pretty && yarn run test:jest",
"test:jest": "jest *.js", "test:jest": "jest *.js",
"test:pretty": "prettier-check --write --no-semi --single-quote --trailing-comma all ./FastImage.js ./example/*.js ./example/fastImage/*.js ./server/*.js" "test:pretty": "prettier-check --write --no-semi --single-quote --trailing-comma all ./index.js ./example/*.js ./example/fastImage/*.js ./server/*.js"
}, },
"dependencies": { "dependencies": {
"prop-types": "^15.5.10" "prop-types": "^15.5.10"
@ -46,8 +46,8 @@
"jest": "^21.2.1", "jest": "^21.2.1",
"prettier": "^1.5.2", "prettier": "^1.5.2",
"prettier-check": "^2.0.0", "prettier-check": "^2.0.0",
"react": "16.0.0", "react": "^16.3.0-alpha.1",
"react-native": "^0.50.4", "react-native": "^0.54.1",
"react-test-renderer": "16.0.0" "react-test-renderer": "16.0.0"
}, },
"jest": { "jest": {

1490
yarn.lock

File diff suppressed because it is too large Load Diff