Skip to content

Commit 7726a6d

Browse files
authored
chore: upgrade Jest and RN to latest (#837)
* chore: upgrade Jest and RN to latest * chore: update test timeout
1 parent 2f5208b commit 7726a6d

File tree

3 files changed

+1319
-1030
lines changed

3 files changed

+1319
-1030
lines changed

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,24 @@
3636
"@release-it/conventional-changelog": "^2.0.0",
3737
"@testing-library/jest-native": "~3.4.3",
3838
"@types/react": "^17.0.0",
39-
"@types/react-native": "^0.64.4",
39+
"@types/react-native": "^0.65.7",
4040
"@types/react-test-renderer": "^17.0.0",
41-
"babel-jest": "^26.0.1",
41+
"babel-jest": "^27.0.0",
4242
"conventional-changelog-cli": "^2.0.11",
4343
"dedent": "^0.7.0",
4444
"eslint": "^7.0.0",
4545
"flow-bin": "^0.141.0",
4646
"flow-copy-source": "^2.0.9",
47-
"jest": "^26.0.1",
48-
"react": "^17.0.1",
49-
"react-native": "^0.64.0-rc.1",
50-
"react-test-renderer": "^17.0.1",
47+
"jest": "^27.0.0",
48+
"react": "^17.0.2",
49+
"react-native": "^0.66.0",
50+
"react-test-renderer": "^17.0.2",
5151
"release-it": "^14.0.3",
5252
"strip-ansi": "^6.0.0",
5353
"typescript": "^4.0.2"
5454
},
5555
"dependencies": {
56-
"pretty-format": "^26.0.1"
56+
"pretty-format": "^27.0.0"
5757
},
5858
"peerDependencies": {
5959
"react": ">=16.0.0",
@@ -79,6 +79,7 @@
7979
"rootDir": "./src",
8080
"testPathIgnorePatterns": [
8181
"timerUtils"
82-
]
82+
],
83+
"testTimeout": 30000
8384
}
8485
}

src/__tests__/__snapshots__/render.test.js.snap

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,28 @@ exports[`debug 1`] = `
1111
not fresh
1212
</Text>
1313
<TextInput
14-
allowFontScaling={true}
1514
placeholder=\\"Add custom freshness\\"
16-
rejectResponderTermination={true}
1715
testID=\\"bananaCustomFreshness\\"
18-
underlineColorAndroid=\\"transparent\\"
1916
value=\\"Custom Freshie\\"
2017
/>
2118
<TextInput
22-
allowFontScaling={true}
2319
defaultValue=\\"What did you inspect?\\"
2420
placeholder=\\"Who inspected freshness?\\"
25-
rejectResponderTermination={true}
2621
testID=\\"bananaChef\\"
27-
underlineColorAndroid=\\"transparent\\"
2822
value=\\"I inspected freshie\\"
2923
/>
3024
<TextInput
31-
allowFontScaling={true}
3225
defaultValue=\\"What banana?\\"
33-
rejectResponderTermination={true}
34-
underlineColorAndroid=\\"transparent\\"
3526
/>
3627
<TextInput
37-
allowFontScaling={true}
3828
defaultValue=\\"hello\\"
39-
rejectResponderTermination={true}
40-
underlineColorAndroid=\\"transparent\\"
4129
value=\\"\\"
4230
/>
4331
<View
4432
accessible={true}
33+
collapsable={false}
4534
focusable={true}
35+
nativeID=\\"animatedComponent\\"
4636
onClick={[Function onClick]}
4737
onResponderGrant={[Function onResponderGrant]}
4838
onResponderMove={[Function onResponderMove]}
@@ -87,33 +77,21 @@ exports[`debug changing component: bananaFresh button message should now be "fre
8777
fresh
8878
</Text>
8979
<TextInput
90-
allowFontScaling={true}
9180
placeholder=\\"Add custom freshness\\"
92-
rejectResponderTermination={true}
9381
testID=\\"bananaCustomFreshness\\"
94-
underlineColorAndroid=\\"transparent\\"
9582
value=\\"Custom Freshie\\"
9683
/>
9784
<TextInput
98-
allowFontScaling={true}
9985
defaultValue=\\"What did you inspect?\\"
10086
placeholder=\\"Who inspected freshness?\\"
101-
rejectResponderTermination={true}
10287
testID=\\"bananaChef\\"
103-
underlineColorAndroid=\\"transparent\\"
10488
value=\\"I inspected freshie\\"
10589
/>
10690
<TextInput
107-
allowFontScaling={true}
10891
defaultValue=\\"What banana?\\"
109-
rejectResponderTermination={true}
110-
underlineColorAndroid=\\"transparent\\"
11192
/>
11293
<TextInput
113-
allowFontScaling={true}
11494
defaultValue=\\"hello\\"
115-
rejectResponderTermination={true}
116-
underlineColorAndroid=\\"transparent\\"
11795
value=\\"\\"
11896
/>
11997
<View
@@ -163,33 +141,21 @@ exports[`debug: shallow 1`] = `
163141
not fresh
164142
</Text>
165143
<TextInput
166-
allowFontScaling={true}
167144
placeholder=\\"Add custom freshness\\"
168-
rejectResponderTermination={true}
169145
testID=\\"bananaCustomFreshness\\"
170-
underlineColorAndroid=\\"transparent\\"
171146
value=\\"Custom Freshie\\"
172147
/>
173148
<TextInput
174-
allowFontScaling={true}
175149
defaultValue=\\"What did you inspect?\\"
176150
placeholder=\\"Who inspected freshness?\\"
177-
rejectResponderTermination={true}
178151
testID=\\"bananaChef\\"
179-
underlineColorAndroid=\\"transparent\\"
180152
value=\\"I inspected freshie\\"
181153
/>
182154
<TextInput
183-
allowFontScaling={true}
184155
defaultValue=\\"What banana?\\"
185-
rejectResponderTermination={true}
186-
underlineColorAndroid=\\"transparent\\"
187156
/>
188157
<TextInput
189-
allowFontScaling={true}
190158
defaultValue=\\"hello\\"
191-
rejectResponderTermination={true}
192-
underlineColorAndroid=\\"transparent\\"
193159
value=\\"\\"
194160
/>
195161
<MyButton
@@ -227,33 +193,21 @@ exports[`debug: shallow with message 1`] = `
227193
not fresh
228194
</Text>
229195
<TextInput
230-
allowFontScaling={true}
231196
placeholder=\\"Add custom freshness\\"
232-
rejectResponderTermination={true}
233197
testID=\\"bananaCustomFreshness\\"
234-
underlineColorAndroid=\\"transparent\\"
235198
value=\\"Custom Freshie\\"
236199
/>
237200
<TextInput
238-
allowFontScaling={true}
239201
defaultValue=\\"What did you inspect?\\"
240202
placeholder=\\"Who inspected freshness?\\"
241-
rejectResponderTermination={true}
242203
testID=\\"bananaChef\\"
243-
underlineColorAndroid=\\"transparent\\"
244204
value=\\"I inspected freshie\\"
245205
/>
246206
<TextInput
247-
allowFontScaling={true}
248207
defaultValue=\\"What banana?\\"
249-
rejectResponderTermination={true}
250-
underlineColorAndroid=\\"transparent\\"
251208
/>
252209
<TextInput
253-
allowFontScaling={true}
254210
defaultValue=\\"hello\\"
255-
rejectResponderTermination={true}
256-
underlineColorAndroid=\\"transparent\\"
257211
value=\\"\\"
258212
/>
259213
<MyButton
@@ -291,38 +245,28 @@ exports[`debug: with message 1`] = `
291245
not fresh
292246
</Text>
293247
<TextInput
294-
allowFontScaling={true}
295248
placeholder=\\"Add custom freshness\\"
296-
rejectResponderTermination={true}
297249
testID=\\"bananaCustomFreshness\\"
298-
underlineColorAndroid=\\"transparent\\"
299250
value=\\"Custom Freshie\\"
300251
/>
301252
<TextInput
302-
allowFontScaling={true}
303253
defaultValue=\\"What did you inspect?\\"
304254
placeholder=\\"Who inspected freshness?\\"
305-
rejectResponderTermination={true}
306255
testID=\\"bananaChef\\"
307-
underlineColorAndroid=\\"transparent\\"
308256
value=\\"I inspected freshie\\"
309257
/>
310258
<TextInput
311-
allowFontScaling={true}
312259
defaultValue=\\"What banana?\\"
313-
rejectResponderTermination={true}
314-
underlineColorAndroid=\\"transparent\\"
315260
/>
316261
<TextInput
317-
allowFontScaling={true}
318262
defaultValue=\\"hello\\"
319-
rejectResponderTermination={true}
320-
underlineColorAndroid=\\"transparent\\"
321263
value=\\"\\"
322264
/>
323265
<View
324266
accessible={true}
267+
collapsable={false}
325268
focusable={true}
269+
nativeID=\\"animatedComponent\\"
326270
onClick={[Function onClick]}
327271
onResponderGrant={[Function onResponderGrant]}
328272
onResponderMove={[Function onResponderMove]}
@@ -359,7 +303,9 @@ exports[`debug: with message 1`] = `
359303
exports[`toJSON 1`] = `
360304
<View
361305
accessible={true}
306+
collapsable={false}
362307
focusable={false}
308+
nativeID="animatedComponent"
363309
onClick={[Function]}
364310
onResponderGrant={[Function]}
365311
onResponderMove={[Function]}

0 commit comments

Comments
 (0)