Skip to content

Commit

Permalink
fix: unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 18, 2024
1 parent 9bedc8d commit fc7ef75
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/matchers/mock/toBeRequestedWith.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ export async function toBeRequestedWith(
{ ...options, wait: isNot ? 0 : options.wait }
)

if (!actual) {
throw new Error('No request was made')
}

const message = enhanceError(
'mock',
minifyRequestedWith(expectedValue),
Expand Down Expand Up @@ -265,11 +261,11 @@ const isMatcher = (filter: unknown) => {
* shorten long url, headers, postData, body
*/
const minifyRequestMock = (
requestMock: {
requestMock?: {
request: local.NetworkRequestData,
response: local.NetworkResponseData
},
requestedWith: ExpectWebdriverIO.RequestedWith
requestedWith?: ExpectWebdriverIO.RequestedWith
) => {
if (typeof requestMock === 'undefined') {
return requestMock
Expand Down

0 comments on commit fc7ef75

Please sign in to comment.