@@ -83,18 +83,14 @@ describe('getFetchRequestArgBody', () => {
8383
8484 describe ( 'does not work without body passed as the second option' , ( ) => {
8585 it . each ( [
86- [ 'string URL only' , [ 'http://example.com' ] , undefined ] ,
87- [ 'URL object only' , [ new URL ( 'http://example.com' ) ] , undefined ] ,
88- [ 'Request URL only' , [ { url : 'http://example.com' } ] , undefined ] ,
89- [
90- 'body in first arg' ,
91- [ { url : 'http://example.com' , method : 'POST' , body : JSON . stringify ( { data : [ 1 , 2 , 3 ] } ) } ] ,
92- undefined ,
93- ] ,
94- ] ) ( '%s' , ( _name , args , expected ) => {
86+ [ 'string URL only' , [ 'http://example.com' ] ] ,
87+ [ 'URL object only' , [ new URL ( 'http://example.com' ) ] ] ,
88+ [ 'Request URL only' , [ { url : 'http://example.com' } ] ] ,
89+ [ 'body in first arg' , [ { url : 'http://example.com' , method : 'POST' , body : JSON . stringify ( { data : [ 1 , 2 , 3 ] } ) } ] ] ,
90+ ] ) ( '%s' , ( _name , args ) => {
9591 const actual = getFetchRequestArgBody ( args ) ;
9692
97- expect ( actual ) . toEqual ( expected ) ;
93+ expect ( actual ) . toBeUndefined ( ) ;
9894 } ) ;
9995 } ) ;
10096} ) ;
0 commit comments