-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move noisy snapshot to separate files
- Loading branch information
1 parent
ff55828
commit 96e2791
Showing
4 changed files
with
188 additions
and
182 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
src/user-event/press/__tests__/__snapshots__/longPress.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`userEvent.longPress with fake timers calls onLongPress if the delayLongPress is the default one 1`] = ` | ||
[ | ||
{ | ||
"name": "longPress", | ||
"payload": { | ||
"currentTarget": { | ||
"measure": [MockFunction] { | ||
"calls": [ | ||
[ | ||
[Function], | ||
], | ||
[ | ||
[Function], | ||
], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
}, | ||
}, | ||
"dispatchConfig": { | ||
"registrationName": "onResponderGrant", | ||
}, | ||
"nativeEvent": { | ||
"changedTouches": [], | ||
"identifier": 0, | ||
"locationX": 0, | ||
"locationY": 0, | ||
"pageX": 0, | ||
"pageY": 0, | ||
"target": 0, | ||
"timestamp": 0, | ||
"touches": [], | ||
}, | ||
"persist": [MockFunction] { | ||
"calls": [ | ||
[], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
}, | ||
"target": {}, | ||
}, | ||
}, | ||
] | ||
`; |
127 changes: 127 additions & 0 deletions
127
src/user-event/press/__tests__/__snapshots__/press.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`userEvent.press with fake timers calls onPressIn, onPress and onPressOut prop of touchable 1`] = ` | ||
[ | ||
{ | ||
"name": "pressIn", | ||
"payload": { | ||
"currentTarget": { | ||
"measure": [MockFunction] { | ||
"calls": [ | ||
[ | ||
[Function], | ||
], | ||
[ | ||
[Function], | ||
], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
}, | ||
}, | ||
"dispatchConfig": { | ||
"registrationName": "onResponderGrant", | ||
}, | ||
"nativeEvent": { | ||
"changedTouches": [], | ||
"identifier": 0, | ||
"locationX": 0, | ||
"locationY": 0, | ||
"pageX": 0, | ||
"pageY": 0, | ||
"target": 0, | ||
"timestamp": 0, | ||
"touches": [], | ||
}, | ||
"persist": [MockFunction] { | ||
"calls": [ | ||
[], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
}, | ||
"target": {}, | ||
}, | ||
}, | ||
{ | ||
"name": "press", | ||
"payload": { | ||
"currentTarget": { | ||
"measure": [MockFunction], | ||
}, | ||
"dispatchConfig": { | ||
"registrationName": "onResponderRelease", | ||
}, | ||
"nativeEvent": { | ||
"changedTouches": [], | ||
"identifier": 0, | ||
"locationX": 0, | ||
"locationY": 0, | ||
"pageX": 0, | ||
"pageY": 0, | ||
"target": 0, | ||
"timestamp": 0, | ||
"touches": [], | ||
}, | ||
"persist": [MockFunction] { | ||
"calls": [ | ||
[], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
}, | ||
"target": {}, | ||
}, | ||
}, | ||
{ | ||
"name": "pressOut", | ||
"payload": { | ||
"currentTarget": { | ||
"measure": [MockFunction], | ||
}, | ||
"dispatchConfig": { | ||
"registrationName": "onResponderRelease", | ||
}, | ||
"nativeEvent": { | ||
"changedTouches": [], | ||
"identifier": 0, | ||
"locationX": 0, | ||
"locationY": 0, | ||
"pageX": 0, | ||
"pageY": 0, | ||
"target": 0, | ||
"timestamp": 0, | ||
"touches": [], | ||
}, | ||
"persist": [MockFunction] { | ||
"calls": [ | ||
[], | ||
], | ||
"results": [ | ||
{ | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
}, | ||
"target": {}, | ||
}, | ||
}, | ||
] | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters