Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit 0878fcf

Browse files
committed
chore: cleanup before release
1 parent 2b06196 commit 0878fcf

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/ISSUE_TEMPLATE/Bug_Report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ We'll probably ask you to submit the fix (after giving some direction). If you'v
1414

1515
- `react-native` or `expo`:
1616
- `native-testing-library` version:
17+
- `jest-preset`:
1718
- `react-native` version:
1819
- `node` version:
19-
- `npm` (or `yarn`) version:
2020

2121
### Relevant code or config:
2222

src/lib/get-node-text.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
function getNodeText(node) {
2-
switch (node.type) {
3-
case 'Button':
4-
return node.getProp('title');
5-
case 'TextInput':
6-
return node.getProp('value');
7-
default:
8-
return Array.from(node.children).join('');
2+
if (node.type === 'Button') {
3+
return node.getProp('title');
4+
} else {
5+
return Array.from(node.children).join('');
96
}
107
}
118

src/lib/query-helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function queryAllByProp(
109109
const matcher = exact ? matches : fuzzyMatches;
110110
const matchNormalizer = makeNormalizer({ collapseWhitespace, trim, normalizer });
111111

112-
return Array.from(container.findAll(c => c.props[prop]))
112+
return Array.from(container.findAll(c => c.getProp(prop)))
113113
.filter(filter)
114114
.filter(node => {
115115
const value = node.getProp(prop);

0 commit comments

Comments
 (0)