@@ -88,7 +88,7 @@ export async function toBeRequestedWith(
8888 * is actual method matching an expected method or methods
8989 */
9090const methodMatcher = ( method : string , expected ?: string | Array < string > ) => {
91- if ( typeof expected === ' undefined' ) {
91+ if ( expected === undefined ) {
9292 return true
9393 }
9494 if ( ! Array . isArray ( expected ) ) {
@@ -108,7 +108,7 @@ const methodMatcher = (method: string, expected?: string | Array<string>) => {
108108 * is actual statusCode matching an expected statusCode or statusCodes
109109 */
110110const statusCodeMatcher = ( statusCode : number , expected ?: number | Array < number > ) => {
111- if ( typeof expected === ' undefined' ) {
111+ if ( expected === undefined ) {
112112 return true
113113 }
114114 if ( ! Array . isArray ( expected ) ) {
@@ -124,7 +124,7 @@ const urlMatcher = (
124124 url : string ,
125125 expected ?: string | ExpectWebdriverIO . PartialMatcher | ( ( url : string ) => boolean )
126126) => {
127- if ( typeof expected === ' undefined' ) {
127+ if ( expected === undefined ) {
128128 return true
129129 }
130130 if ( typeof expected === 'function' ) {
@@ -148,7 +148,7 @@ const headersMatcher = (
148148 * if header matcher is an empty object, match with no headers
149149 */
150150 if (
151- typeof expected === ' undefined' ||
151+ expected === undefined ||
152152 typeof expected === 'object' && Object . keys ( expected ) . length === 0
153153 ) {
154154 return true
@@ -267,7 +267,7 @@ const minifyRequestMock = (
267267 } ,
268268 requestedWith ?: ExpectWebdriverIO . RequestedWith
269269) => {
270- if ( typeof requestMock === ' undefined' ) {
270+ if ( requestMock === undefined ) {
271271 return requestMock
272272 }
273273
@@ -320,7 +320,7 @@ const requestedWithParamToString = (
320320 | undefined ,
321321 transformFn ?: ( param : ExpectWebdriverIO . JsonCompatible ) => ExpectWebdriverIO . JsonCompatible | string
322322) => {
323- if ( typeof param === ' undefined' ) {
323+ if ( param === undefined ) {
324324 return
325325 }
326326
@@ -394,7 +394,7 @@ const shortenString = (str: string, limit = STR_LIMIT) => {
394394
395395const deleteUndefinedValues = ( obj : Record < string , unknown > , baseline = obj ) => {
396396 Object . keys ( obj ) . forEach ( ( k ) => {
397- if ( typeof baseline [ k ] === ' undefined' ) {
397+ if ( baseline [ k ] === undefined ) {
398398 delete obj [ k ]
399399 }
400400 } )
0 commit comments