Commit e49b788
Fix a bug in preact testing library usage example (#807)
Current example `expect(screen.textContent).toMatch("Current value: 6");`
failed with the following error message
expect(received).toMatch(expected)
Matcher error: received value must be a string
Received has value: undefined
queries like getByText should be used to work with Async APIs
like waitFor or findBy
Co-authored-by: Heather Koo <[email protected]>
Co-authored-by: Jason Miller <[email protected]>1 parent 18b58b6 commit e49b788
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | | - | |
| 101 | + | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
| |||
0 commit comments