11import { vi , test , describe , expect } from 'vitest'
22import { $ } from '@wdio/globals'
3- import { getExpectMessage , getReceived , matcherNameToString } from '../__fixtures__/utils.js'
3+ import { getExpectMessage , matcherNameToString } from '../__fixtures__/utils.js'
44import * as Matchers from '../../src/matchers.js'
55
66vi . mock ( '@wdio/globals' )
@@ -96,9 +96,8 @@ describe('be* matchers', () => {
9696
9797 test ( 'not - failure' , async ( ) => {
9898 const result = await fn . call ( { isNot : true } , $ ( 'sel' ) , { wait : 0 } ) as ExpectWebdriverIO . AssertionResult
99- const received = getReceived ( result . message ( ) )
10099
101- expect ( received ) . toContain ( 'not' )
100+ expect ( result . message ( ) ) . toContain ( 'not' )
102101 expect ( result . pass ) . toBe ( false )
103102 } )
104103
@@ -115,9 +114,8 @@ describe('be* matchers', () => {
115114
116115 test ( 'not - failure (with wait)' , async ( ) => {
117116 const result = await fn . call ( { isNot : true } , $ ( 'sel' ) , { wait : 1 } ) as ExpectWebdriverIO . AssertionResult
118- const received = getReceived ( result . message ( ) )
119117
120- expect ( received ) . toContain ( 'not' )
118+ expect ( result . message ( ) ) . toContain ( 'not' )
121119 expect ( result . pass ) . toBe ( false )
122120 } )
123121
0 commit comments