From 8cfef85934de115dc50a9210e60190f1cfee020d Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Tue, 1 Dec 2015 15:50:38 -0800 Subject: [PATCH] [fix] Image tests --- src/components/Image/index.js | 2 +- src/components/TextInput/__tests__/index-test.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/Image/index.js b/src/components/Image/index.js index b29ec2ab..a3bc2cd5 100644 --- a/src/components/Image/index.js +++ b/src/components/Image/index.js @@ -20,7 +20,7 @@ const styles = StyleSheet.create({ backgroundColor: 'lightgray', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', - backgroundSize: '100% 100%' + backgroundSize: 'cover' }, img: { borderWidth: 0, diff --git a/src/components/TextInput/__tests__/index-test.js b/src/components/TextInput/__tests__/index-test.js index f2daceb8..d0e2312c 100644 --- a/src/components/TextInput/__tests__/index-test.js +++ b/src/components/TextInput/__tests__/index-test.js @@ -88,17 +88,18 @@ suite('components/TextInput', () => { test('prop "maxNumberOfLines"', () => { const style = { borderWidth: 0, fontSize: 20, lineHeight: 1 } - const value = (() => { + const generateValue = () => { let str = '' while (str.length < 100) str += 'x' return str - }()) + } + let dom = utils.renderAndInject( ) const height = dom.getBoundingClientRect().height