File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff 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 ( ) => {
You can’t perform that action at this time.
0 commit comments