Skip to content

Commit c9ecd99

Browse files
committed
✅ unmount test
1 parent f15f626 commit c9ecd99

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: test.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ describe("use-db", () => {
137137
});
138138
});
139139

140-
const key = crypto.randomUUID();
141140
test("handles undefined as a valid state", () => {
141+
const key = crypto.randomUUID();
142142
const { result } = renderHook(() => useDb(key));
143143

144144
const [initialState] = result.current;
@@ -160,6 +160,12 @@ describe("use-db", () => {
160160
const [finalState] = result.current;
161161
expect(finalState).toBeUndefined();
162162
});
163+
164+
test("unmount", () => {
165+
const key = crypto.randomUUID();
166+
const { unmount } = renderHook(() => useDb(key));
167+
unmount();
168+
});
163169
});
164170

165171
describe("non-optimistic", () => {

0 commit comments

Comments
 (0)