We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ba7fe9 commit 5fc498fCopy full SHA for 5fc498f
MIGRATION_GUIDE.md
@@ -115,6 +115,20 @@ APIs. A similar result can be achieved by using `waitFor`:
115
+});
116
```
117
118
+Alternatively this utility can be implemented as the following, for a direct migration:
119
+
120
+```ts
121
+import { waitFor } from '@testing-library/react';
122
123
+const waitForValueToChange = async <T>(getValue: () => T) => {
124
+ const original = getValue();
125
126
+ await waitFor(async () => {
127
+ expect(await original).not.toBe(await getValue());
128
+ });
129
+};
130
+```
131
132
## `waitForNextUpdate`
133
134
This utility has not been included in the React Testing Library or React Native Testing Library
0 commit comments