@@ -453,13 +453,10 @@ describe('type assertions', () => {
453453
454454 describe ( 'toBe' , ( ) => {
455455 it ( 'should expect void type when actual is a boolean' , async ( ) => {
456- // TODO dprevost we migth need to be a Promise here because of the expectAsync of wdio
457456 expectVoid = expect ( true ) . toBe ( true )
458457 expectVoid = expect ( true ) . not . toBe ( true )
459458
460- //@ts -expect-error
461459 expectPromiseVoid = expectAsync ( true ) . toBe ( true )
462- //@ts -expect-error
463460 expectPromiseVoid = expectAsync ( true ) . not . toBe ( true )
464461 } )
465462
@@ -480,9 +477,7 @@ describe('type assertions', () => {
480477 expectPromiseUnknown = expectAsync ( promiseBoolean ) . toBe ( true )
481478 expectPromiseUnknown = expectAsync ( promiseBoolean ) . not . toBe ( true )
482479
483- //@ts -expect-error
484480 expectPromiseVoid = expectAsync ( promiseBoolean ) . toBe ( true )
485- //@ts -expect-error
486481 expectPromiseVoid = expectAsync ( promiseBoolean ) . toBe ( true )
487482 } )
488483
@@ -492,13 +487,9 @@ describe('type assertions', () => {
492487 expectPromiseUnknown = expectAsync ( 'text' ) . toBe ( wdioExpect . stringContaining ( 'text' ) )
493488 expectPromiseUnknown = expectAsync ( 'text' ) . not . toBe ( wdioExpect . stringContaining ( 'text' ) )
494489
495- //@ts -expect-error
496490 expectPromiseVoid = expectAsync ( 'text' ) . toBe ( true )
497- //@ts -expect-error
498491 expectPromiseVoid = expectAsync ( 'text' ) . not . toBe ( true )
499- //@ts -expect-error
500492 expectPromiseVoid = expectAsync ( 'text' ) . toBe ( wdioExpect . stringContaining ( 'text' ) )
501- //@ts -expect-error
502493 expectPromiseVoid = expectAsync ( 'text' ) . not . toBe ( wdioExpect . stringContaining ( 'text' ) )
503494 } )
504495 } )
@@ -520,9 +511,7 @@ describe('type assertions', () => {
520511 } )
521512
522513 it ( 'should not support chainable and expect PromiseVoid with toBe' , async ( ) => {
523- //@ts -expect-error
524514 expectPromiseVoid = expectAsync ( chainableElement ) . toBe ( true )
525- //@ts -expect-error
526515 expectPromiseVoid = expectAsync ( chainableElement ) . not . toBe ( true )
527516 } )
528517 } )
0 commit comments