@@ -46,8 +46,6 @@ describe('type assertions', async () => {
4646
4747 // @ts -expect-error
4848 await expect ( browser ) . toHaveUrl ( 6 )
49- //// @ts -expect-error TODO dprevost can we make the below fail?
50- // await expect(browser).toHaveUrl(expect.objectContaining({}))
5149 } )
5250
5351 it ( 'should have ts errors when actual is not a Browser element' , async ( ) => {
@@ -538,7 +536,7 @@ describe('type assertions', async () => {
538536
539537 it ( 'should expect a Promise of type' , async ( ) => {
540538 const expectPromiseBoolean1 : ExpectWebdriverIO . MatchersAndInverse < void , Promise < boolean > > = expect ( booleanPromise )
541- const expectPromiseBoolean2 : jest . Matchers < void , Promise < boolean > > = expect ( booleanPromise ) . not
539+ const expectPromiseBoolean2 : ExpectWebdriverIO . Matchers < void , Promise < boolean > > = expect ( booleanPromise ) . not
542540
543541 // @ts -expect-error
544542 const expectPromiseBoolean3 : jest . JestMatchers < boolean > = expect ( booleanPromise )
@@ -589,11 +587,6 @@ describe('type assertions', async () => {
589587 response : { success : true } ,
590588 } )
591589
592- // TODO dprevost: Asymmetric matcher is not defined on the entire object in the .d.ts file, it is a bug?
593- // expectPromiseVoid = expect(promiseNetworkMock).toBeRequestedWith(expect.objectContaining({
594- // response: { success: true }, // [optional] object | function | custom matcher
595- // }))
596-
597590 expectPromiseVoid = expect ( promiseNetworkMock ) . toBeRequestedWith ( {
598591 url : expect . stringContaining ( 'test' ) ,
599592 method : 'POST' ,
@@ -681,22 +674,14 @@ describe('type assertions', async () => {
681674 expect . not . arrayContaining ( [ 'WebdriverIO' , 'Test' ] )
682675 expect . not . arrayOf ( expect . stringContaining ( 'WebdriverIO' ) )
683676
684- //@ts -expect-error
685- expect . not . anything ( )
686- //@ts -expect-error
687- expect . not . any ( Function )
688- //@ts -expect-error
689- expect . not . any ( Number )
690- //@ts -expect-error
691- expect . not . any ( Boolean )
692- //@ts -expect-error
693- expect . not . any ( String )
694- //@ts -expect-error
695- expect . not . any ( Symbol )
696- //@ts -expect-error
697- expect . not . any ( Date )
698- //@ts -expect-error
699- expect . not . any ( Error )
677+ // expect.not.anything()
678+ // expect.not.any(Function)
679+ // expect.not.any(Number)
680+ // expect.not.any(Boolean)
681+ // expect.not.any(String)
682+ // expect.not.any(Symbol)
683+ // expect.not.any(Date)
684+ // expect.not.any(Error)
700685 } )
701686
702687 describe ( 'Soft Assertions' , async ( ) => {
@@ -733,13 +718,13 @@ describe('type assertions', async () => {
733718 } )
734719
735720 it ( 'should support chainable element' , async ( ) => {
736- const expectElement : WdioCustomMatchers < void , WebdriverIO . Element > = expect . soft ( element )
737- const expectElementChainable : WdioCustomMatchers < void , typeof chainableElement > = expect . soft ( chainableElement )
721+ const expectElement : ExpectWebdriverIO . MatchersAndInverse < void , WebdriverIO . Element > = expect . soft ( element )
722+ const expectElementChainable : ExpectWebdriverIO . MatchersAndInverse < void , typeof chainableElement > = expect . soft ( chainableElement )
738723
739724 // @ts -expect-error
740- const expectElement2 : WdioCustomMatchers < Promise < void > , WebdriverIO . Element > = expect . soft ( element )
725+ const expectElement2 : ExpectWebdriverIO . MatchersAndInverse < Promise < void > , WebdriverIO . Element > = expect . soft ( element )
741726 // @ts -expect-error
742- const expectElementChainable2 : WdioCustomMatchers < Promise < void > , typeof chainableElement > = expect . soft ( chainableElement )
727+ const expectElementChainable2 : ExpectWebdriverIO . MatchersAndInverse < Promise < void > , typeof chainableElement > = expect . soft ( chainableElement )
743728 } )
744729
745730 it ( 'should support chainable element with wdio Matchers' , async ( ) => {
0 commit comments