@@ -227,6 +227,8 @@ describe("client", () => {
227227 } ) ;
228228
229229 describe ( "body" , ( ) => {
230+ // these are pure type tests; no runtime assertions needed
231+ /* eslint-disable vitest/expect-expect */
230232 it ( "requires necessary requestBodies" , async ( ) => {
231233 const client = createClient < paths > ( { baseUrl : "https://myapi.com/v1" } ) ;
232234 mockFetch ( { status : 200 , body : JSON . stringify ( { message : "OK" } ) } ) ;
@@ -285,6 +287,7 @@ describe("client", () => {
285287 } ) ;
286288 } ) ;
287289 } ) ;
290+ /* eslint-enable vitest/expect-expect */
288291 } ) ;
289292
290293 describe ( "options" , ( ) => {
@@ -408,7 +411,7 @@ describe("client", () => {
408411 expect ( response . status ) . toBe ( 204 ) ;
409412
410413 // assert error is empty
411- expect ( error ) . toBe ( undefined ) ;
414+ expect ( error ) . toBeUndefined ( ) ;
412415 } ) ;
413416
414417 it ( "treats `default` as an error" , async ( ) => {
@@ -478,7 +481,7 @@ describe("client", () => {
478481 expect ( response . status ) . toBe ( 200 ) ;
479482
480483 // assert error is empty
481- expect ( error ) . toBe ( undefined ) ;
484+ expect ( error ) . toBeUndefined ( ) ;
482485 } ) ;
483486
484487 it ( "sends correct options, returns error" , async ( ) => {
@@ -500,7 +503,7 @@ describe("client", () => {
500503 expect ( response . status ) . toBe ( 404 ) ;
501504
502505 // assert data is empty
503- expect ( data ) . toBe ( undefined ) ;
506+ expect ( data ) . toBeUndefined ( ) ;
504507 } ) ;
505508
506509 // note: this was a previous bug in the type inference
@@ -543,7 +546,7 @@ describe("client", () => {
543546 expect ( response . status ) . toBe ( 201 ) ;
544547
545548 // assert error is empty
546- expect ( error ) . toBe ( undefined ) ;
549+ expect ( error ) . toBeUndefined ( ) ;
547550 } ) ;
548551
549552 it ( "supports sepecifying utf-8 encoding" , async ( ) => {
@@ -563,7 +566,7 @@ describe("client", () => {
563566 expect ( response . status ) . toBe ( 201 ) ;
564567
565568 // assert error is empty
566- expect ( error ) . toBe ( undefined ) ;
569+ expect ( error ) . toBeUndefined ( ) ;
567570 } ) ;
568571 } ) ;
569572
@@ -588,7 +591,7 @@ describe("client", () => {
588591 expect ( data ) . toEqual ( { } ) ;
589592
590593 // assert error is empty
591- expect ( error ) . toBe ( undefined ) ;
594+ expect ( error ) . toBeUndefined ( ) ;
592595 } ) ;
593596
594597 it ( "returns empty object on Content-Length: 0" , async ( ) => {
@@ -604,7 +607,7 @@ describe("client", () => {
604607 expect ( data ) . toEqual ( { } ) ;
605608
606609 // assert error is empty
607- expect ( error ) . toBe ( undefined ) ;
610+ expect ( error ) . toBeUndefined ( ) ;
608611 } ) ;
609612 } ) ;
610613
0 commit comments