We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f15f626 commit c9ecd99Copy full SHA for c9ecd99
test.ts
@@ -137,8 +137,8 @@ describe("use-db", () => {
137
});
138
139
140
- const key = crypto.randomUUID();
141
test("handles undefined as a valid state", () => {
+ const key = crypto.randomUUID();
142
const { result } = renderHook(() => useDb(key));
143
144
const [initialState] = result.current;
@@ -160,6 +160,12 @@ describe("use-db", () => {
160
const [finalState] = result.current;
161
expect(finalState).toBeUndefined();
162
163
+
164
+ test("unmount", () => {
165
166
+ const { unmount } = renderHook(() => useDb(key));
167
+ unmount();
168
+ });
169
170
171
describe("non-optimistic", () => {
0 commit comments