Skip to content

Commit 7bbd2cc

Browse files
tim-smartdatner
authored andcommitted
test cleanup
1 parent e5e4094 commit 7bbd2cc

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/hooks/useResult.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ describe("useResult", () => {
2323

2424
it("should provide context", async () => {
2525
const testEffect = Effect.map(foo, (_) => _.value)
26-
27-
const renderResult = await waitFor(async () => renderHook(() => useResult(() => testEffect, [])))
28-
const result = renderResult.result.current.result
29-
30-
await waitFor(() => expect(Result.isSuccess(result)).toBe(true))
31-
expect(result._tag === "Success" && result.value).toBe(1)
26+
const { result } = await waitFor(async () => renderHook(() => useResult(() => testEffect, [])))
27+
await waitFor(() => expect(Result.isSuccess(result.current.result)).toBe(true))
28+
assert(Result.isSuccess(result.current.result))
29+
expect(result.current.result.value).toBe(1)
3230
})
3331

3432
it("should run streams", async () => {

0 commit comments

Comments
 (0)