Skip to content

Commit 3ee4199

Browse files
committed
refactor. remove unnecessary try/catch
1 parent b4bf289 commit 3ee4199

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/helpers/getByAPI.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,9 @@ const getTextInputNodeByDisplayValue = (node, value) => {
9090
};
9191

9292
const getNodeByTestId = (node, testID) => {
93-
try {
94-
return typeof testID === 'string'
95-
? testID === node.props.testID
96-
: testID.test(node.props.testID);
97-
} catch (error) {
98-
throw createLibraryNotSupportedError(error);
99-
}
93+
return typeof testID === 'string'
94+
? testID === node.props.testID
95+
: testID.test(node.props.testID);
10096
};
10197

10298
export const getByText = (instance: ReactTestInstance) =>

0 commit comments

Comments
 (0)