@@ -12,7 +12,7 @@ describe('useItem', () => {
1212 fetch
1313 . mockResponseOnce ( JSON . stringify ( { id : 'abc' , links : [ ] } ) )
1414 . mockResponseOnce ( JSON . stringify ( { id : 'abc' } ) ) ;
15-
15+
1616 const { result, waitForNextUpdate } = renderHook (
1717 ( ) => useItem ( 'https://fake-stac-api.net/items/abc' ) ,
1818 { wrapper }
@@ -25,7 +25,10 @@ describe('useItem', () => {
2525 it ( 'handles error with JSON response' , async ( ) => {
2626 fetch
2727 . mockResponseOnce ( JSON . stringify ( { id : 'abc' , links : [ ] } ) )
28- . mockResponseOnce ( JSON . stringify ( { error : 'Wrong query' } ) , { status : 400 , statusText : 'Bad Request' } ) ;
28+ . mockResponseOnce ( JSON . stringify ( { error : 'Wrong query' } ) , {
29+ status : 400 ,
30+ statusText : 'Bad Request'
31+ } ) ;
2932
3033 const { result, waitForNextUpdate } = renderHook (
3134 ( ) => useItem ( 'https://fake-stac-api.net/items/abc' ) ,
@@ -43,7 +46,10 @@ describe('useItem', () => {
4346 it ( 'handles error with non-JSON response' , async ( ) => {
4447 fetch
4548 . mockResponseOnce ( JSON . stringify ( { id : 'abc' , links : [ ] } ) )
46- . mockResponseOnce ( 'Wrong query' , { status : 400 , statusText : 'Bad Request' } ) ;
49+ . mockResponseOnce ( 'Wrong query' , {
50+ status : 400 ,
51+ statusText : 'Bad Request'
52+ } ) ;
4753
4854 const { result, waitForNextUpdate } = renderHook (
4955 ( ) => useItem ( 'https://fake-stac-api.net/items/abc' ) ,
@@ -63,7 +69,7 @@ describe('useItem', () => {
6369 . mockResponseOnce ( JSON . stringify ( { id : 'abc' , links : [ ] } ) )
6470 . mockResponseOnce ( JSON . stringify ( { id : 'abc' } ) )
6571 . mockResponseOnce ( JSON . stringify ( { id : 'abc' , description : 'Updated' } ) ) ;
66-
72+
6773 const { result, waitForNextUpdate } = renderHook (
6874 ( ) => useItem ( 'https://fake-stac-api.net/items/abc' ) ,
6975 { wrapper }
0 commit comments