Skip to content

Commit ba6f59d

Browse files
chore: Fix unit tests
1 parent c47a9f4 commit ba6f59d

File tree

2 files changed

+108
-12
lines changed

2 files changed

+108
-12
lines changed

Libraries/Components/Touchable/__tests__/__snapshots__/TouchableOpacity-test.js.snap

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,15 @@ exports[`TouchableOpacity renders correctly 1`] = `
3131
onStartShouldSetResponder={[Function]}
3232
style={
3333
Object {
34-
"opacity": 1,
34+
"0": Array [
35+
undefined,
36+
Object {
37+
"opacity": 1,
38+
},
39+
],
40+
"1": Object {
41+
"opacity": 1,
42+
},
3543
}
3644
}
3745
>
@@ -72,7 +80,15 @@ exports[`TouchableOpacity renders in disabled state when a disabled prop is pass
7280
onStartShouldSetResponder={[Function]}
7381
style={
7482
Object {
75-
"opacity": 1,
83+
"0": Array [
84+
undefined,
85+
Object {
86+
"opacity": 1,
87+
},
88+
],
89+
"1": Object {
90+
"opacity": 1,
91+
},
7692
}
7793
}
7894
>
@@ -113,7 +129,15 @@ exports[`TouchableOpacity renders in disabled state when a key disabled in acces
113129
onStartShouldSetResponder={[Function]}
114130
style={
115131
Object {
116-
"opacity": 1,
132+
"0": Array [
133+
undefined,
134+
Object {
135+
"opacity": 1,
136+
},
137+
],
138+
"1": Object {
139+
"opacity": 1,
140+
},
117141
}
118142
}
119143
>

Libraries/Components/__tests__/__snapshots__/Button-test.js.snap

Lines changed: 81 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ exports[`<Button /> should be disabled and it should set accessibilityState to d
3232
onStartShouldSetResponder={[Function]}
3333
style={
3434
Object {
35-
"opacity": 1,
35+
"0": Array [
36+
undefined,
37+
Object {
38+
"opacity": 1,
39+
},
40+
],
41+
"1": Object {
42+
"opacity": 1,
43+
},
3644
}
3745
}
3846
>
@@ -98,7 +106,15 @@ exports[`<Button /> should be disabled when disabled is empty and accessibilityS
98106
onStartShouldSetResponder={[Function]}
99107
style={
100108
Object {
101-
"opacity": 1,
109+
"0": Array [
110+
undefined,
111+
Object {
112+
"opacity": 1,
113+
},
114+
],
115+
"1": Object {
116+
"opacity": 1,
117+
},
102118
}
103119
}
104120
>
@@ -164,7 +180,15 @@ exports[`<Button /> should be disabled when disabled={true} and accessibilitySta
164180
onStartShouldSetResponder={[Function]}
165181
style={
166182
Object {
167-
"opacity": 1,
183+
"0": Array [
184+
undefined,
185+
Object {
186+
"opacity": 1,
187+
},
188+
],
189+
"1": Object {
190+
"opacity": 1,
191+
},
168192
}
169193
}
170194
>
@@ -231,7 +255,15 @@ exports[`<Button /> should be set importantForAccessibility={no-hide-descendants
231255
onStartShouldSetResponder={[Function]}
232256
style={
233257
Object {
234-
"opacity": 1,
258+
"0": Array [
259+
undefined,
260+
Object {
261+
"opacity": 1,
262+
},
263+
],
264+
"1": Object {
265+
"opacity": 1,
266+
},
235267
}
236268
}
237269
>
@@ -293,7 +325,15 @@ exports[`<Button /> should be set importantForAccessibility={no-hide-descendants
293325
onStartShouldSetResponder={[Function]}
294326
style={
295327
Object {
296-
"opacity": 1,
328+
"0": Array [
329+
undefined,
330+
Object {
331+
"opacity": 1,
332+
},
333+
],
334+
"1": Object {
335+
"opacity": 1,
336+
},
297337
}
298338
}
299339
>
@@ -354,7 +394,15 @@ exports[`<Button /> should not be disabled when disabled={false} and accessibili
354394
onStartShouldSetResponder={[Function]}
355395
style={
356396
Object {
357-
"opacity": 1,
397+
"0": Array [
398+
undefined,
399+
Object {
400+
"opacity": 1,
401+
},
402+
],
403+
"1": Object {
404+
"opacity": 1,
405+
},
358406
}
359407
}
360408
>
@@ -416,7 +464,15 @@ exports[`<Button /> should not be disabled when disabled={false} and accessibili
416464
onStartShouldSetResponder={[Function]}
417465
style={
418466
Object {
419-
"opacity": 1,
467+
"0": Array [
468+
undefined,
469+
Object {
470+
"opacity": 1,
471+
},
472+
],
473+
"1": Object {
474+
"opacity": 1,
475+
},
420476
}
421477
}
422478
>
@@ -478,7 +534,15 @@ exports[`<Button /> should overwrite accessibilityState with value of disabled p
478534
onStartShouldSetResponder={[Function]}
479535
style={
480536
Object {
481-
"opacity": 1,
537+
"0": Array [
538+
undefined,
539+
Object {
540+
"opacity": 1,
541+
},
542+
],
543+
"1": Object {
544+
"opacity": 1,
545+
},
482546
}
483547
}
484548
>
@@ -544,7 +608,15 @@ exports[`<Button /> should render as expected 1`] = `
544608
onStartShouldSetResponder={[Function]}
545609
style={
546610
Object {
547-
"opacity": 1,
611+
"0": Array [
612+
undefined,
613+
Object {
614+
"opacity": 1,
615+
},
616+
],
617+
"1": Object {
618+
"opacity": 1,
619+
},
548620
}
549621
}
550622
>

0 commit comments

Comments
 (0)