[fix] Image tests

This commit is contained in:
Nicolas Gallagher
2015-12-01 15:50:38 -08:00
parent 6db24e9358
commit 8cfef85934
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ const styles = StyleSheet.create({
backgroundColor: 'lightgray',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundSize: '100% 100%'
backgroundSize: 'cover'
},
img: {
borderWidth: 0,
@@ -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(
<TextInput
maxNumberOfLines={3}
multiline
style={style}
value={value}
value={generateValue()}
/>
)
const height = dom.getBoundingClientRect().height