Skip to content

Commit

Permalink
Fix TextInput-cursorPlacement test
Browse files Browse the repository at this point in the history
Summary:
Changelog:
[Internal] -  In internal e2e testing, json.stringify is unstable and will occasionally re-order keys. Fix so it's consistent across tests

Reviewed By: kacieb

Differential Revision: D28397174

fbshipit-source-id: 0f2db697d245654c88c3dff3d083bc82890d4bc1
  • Loading branch information
Luna Wei authored and facebook-github-bot committed May 19, 2021
1 parent 6b713f5 commit ec2dc9e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ class TokenizedTextExample extends React.Component<
type SelectionExampleState = {
selection: $ReadOnly<{|
start: number,
end?: number,
end: number,
|}>,
value: string,
...
Expand Down Expand Up @@ -436,7 +436,8 @@ class SelectionExample extends React.Component<
</View>
<View>
<Text testID={`${this.props.testID}-selection`}>
selection = {JSON.stringify(this.state.selection).replace(/"/g, '')}
selection ={' '}
{`{start:${this.state.selection.start},end:${this.state.selection.end}}`}
</Text>
<Text
testID={`${this.props.testID}-cursor-start`}
Expand Down

0 comments on commit ec2dc9e

Please sign in to comment.