Commit 0f2094e
authored
fix: re-render w/ useWhenProviderReady, add tests (#901)
This PR:
- brings react-sdk test coverage from 0% to ~95%
- adds DOM-based testing (tests based on asserting DOM entity states)
- tests for query-style, basic, and detailed evaluation APIs
- tests for suspense functionality and re-rendering on context change
- tests for some util functions and hooks
- `renderHook` tests for non suspending hooks
- fixes a bug where `useWhenProviderReady` didn't cause re-render after
the provider is ready if suspense wasn't used (leading to an out-of-date
return value for provider readiness)

---------
Signed-off-by: Todd Baert <[email protected]>1 parent 240a461 commit 0f2094e
File tree
8 files changed
+1095
-9
lines changed- packages/react
- src/provider
- test
8 files changed
+1095
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
174 | 192 | | |
175 | 193 | | |
176 | 194 | | |
| |||
0 commit comments