@@ -101,7 +101,7 @@ Received : "WebdriverIO"`
101101 const el = await $ ( 'sel' )
102102 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
103103
104- const result = await toHaveComputedRole . bind ( { isNot : true } ) ( el , 'foobar' , { wait : 1 } )
104+ const result = await thisNotContext . toHaveComputedRole ( el , 'foobar' , { wait : 1 } )
105105
106106 expect ( result . pass ) . toBe ( true )
107107 } )
@@ -110,7 +110,7 @@ Received : "WebdriverIO"`
110110 const el = await $ ( 'sel' )
111111 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
112112
113- const result = await toHaveComputedRole . bind ( { } ) ( el , 'BrowserdriverIO' , {
113+ const result = await thisContext . toHaveComputedRole ( el , 'BrowserdriverIO' , {
114114 replace : [ 'Web' , 'Browser' ] ,
115115 } )
116116 expect ( result . pass ) . toBe ( true )
@@ -120,7 +120,7 @@ Received : "WebdriverIO"`
120120 const el = await $ ( 'sel' )
121121 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
122122
123- const result = await toHaveComputedRole . bind ( { } ) ( el , 'BrowserdriverIO' , {
123+ const result = await thisContext . toHaveComputedRole ( el , 'BrowserdriverIO' , {
124124 replace : [ [ 'Web' , 'Browser' ] ] ,
125125 } )
126126 expect ( result . pass ) . toBe ( true )
@@ -130,7 +130,7 @@ Received : "WebdriverIO"`
130130 const el = await $ ( 'sel' )
131131 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
132132
133- const result = await toHaveComputedRole . bind ( { } ) ( el , 'BrowserdriverIO' , {
133+ const result = await thisContext . toHaveComputedRole ( el , 'BrowserdriverIO' , {
134134 replace : [ [ / W e b / , 'Browser' ] ] ,
135135 } )
136136 expect ( result . pass ) . toBe ( true )
@@ -140,23 +140,23 @@ Received : "WebdriverIO"`
140140 const el = await $ ( 'sel' )
141141 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
142142
143- const result = await toHaveComputedRole . bind ( { } ) ( el , 'Webd' , { atStart : true } )
143+ const result = await thisContext . toHaveComputedRole ( el , 'Webd' , { atStart : true } )
144144 expect ( result . pass ) . toBe ( true )
145145 } )
146146
147147 test ( 'should return true if actual computed role ends with expected computed role' , async ( ) => {
148148 const el = await $ ( 'sel' )
149149 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
150150
151- const result = await toHaveComputedRole . bind ( { } ) ( el , 'erIO' , { atEnd : true } )
151+ const result = await thisContext . toHaveComputedRole ( el , 'erIO' , { atEnd : true } )
152152 expect ( result . pass ) . toBe ( true )
153153 } )
154154
155155 test ( 'should return true if actual computed role contains the expected computed role at the given index' , async ( ) => {
156156 const el = await $ ( 'sel' )
157157 vi . mocked ( el . getComputedRole ) . mockResolvedValueOnce ( 'WebdriverIO' )
158158
159- const result = await toHaveComputedRole . bind ( { } ) ( el , 'iver' , { atIndex : 5 } )
159+ const result = await thisContext . toHaveComputedRole ( el , 'iver' , { atIndex : 5 } )
160160 expect ( result . pass ) . toBe ( true )
161161 } )
162162
0 commit comments