@@ -39,13 +39,13 @@ module.exports = class Interceptor {
3939 ! uri . startsWith ( '*' )
4040 ) {
4141 throw Error (
42- `Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything) (got: ${ uri } )`
42+ `Non-wildcard URL path strings must begin with a slash (otherwise they won't match anything) (got: ${ uri } )` ,
4343 )
4444 }
4545
4646 if ( ! method ) {
4747 throw new Error (
48- 'The "method" parameter is required for an intercept call.'
48+ 'The "method" parameter is required for an intercept call.' ,
4949 )
5050 }
5151
@@ -67,10 +67,10 @@ module.exports = class Interceptor {
6767 // We use lower-case header field names throughout Nock.
6868 this . reqheaders = common . headersFieldNamesToLowerCase (
6969 scope . scopeOptions . reqheaders || { } ,
70- true
70+ true ,
7171 )
7272 this . badheaders = common . headersFieldsArrayToLowerCase (
73- scope . scopeOptions . badheaders || [ ]
73+ scope . scopeOptions . badheaders || [ ] ,
7474 )
7575
7676 this . delayBodyInMs = 0
@@ -118,7 +118,7 @@ module.exports = class Interceptor {
118118 // It's not very Javascript-y to throw an error for extra args to a function, but because
119119 // of legacy behavior, this error was added to reduce confusion for those migrating.
120120 throw Error (
121- 'Invalid arguments. When providing a function for the first argument, .reply does not accept other arguments.'
121+ 'Invalid arguments. When providing a function for the first argument, .reply does not accept other arguments.' ,
122122 )
123123 }
124124 this . statusCode = null
@@ -152,7 +152,7 @@ module.exports = class Interceptor {
152152 // Including all the default headers is safe for our purposes because of the specific headers we introspect.
153153 // A more thoughtful process is used to merge the default headers when the response headers are finally computed.
154154 this . headers = common . headersArrayToObject (
155- this . rawHeaders . concat ( this . scope . _defaultReplyHeaders )
155+ this . rawHeaders . concat ( this . scope . _defaultReplyHeaders ) ,
156156 )
157157
158158 // If the content is not encoded we may need to transform the response body.
@@ -236,7 +236,7 @@ module.exports = class Interceptor {
236236 "request header field doesn't match:" ,
237237 key ,
238238 header ,
239- reqHeader
239+ reqHeader ,
240240 )
241241 return false
242242 }
@@ -247,7 +247,7 @@ module.exports = class Interceptor {
247247 this . scope . logger (
248248 'attempting match %s, body = %s' ,
249249 stringify ( options ) ,
250- stringify ( body )
250+ stringify ( body ) ,
251251 )
252252 }
253253
@@ -259,7 +259,7 @@ module.exports = class Interceptor {
259259
260260 if ( this . method !== method ) {
261261 this . scope . logger (
262- `Method did not match. Request ${ method } Interceptor ${ this . method } `
262+ `Method did not match. Request ${ method } Interceptor ${ this . method } ` ,
263263 )
264264 return false
265265 }
@@ -286,7 +286,7 @@ module.exports = class Interceptor {
286286 }
287287
288288 const reqHeadersMatch = Object . keys ( this . reqheaders ) . every ( key =>
289- this . reqheaderMatches ( options , key )
289+ this . reqheaderMatches ( options , key ) ,
290290 )
291291
292292 if ( ! reqHeadersMatch ) {
@@ -299,13 +299,13 @@ module.exports = class Interceptor {
299299 ! this . scope . scopeOptions . conditionally ( )
300300 ) {
301301 this . scope . logger (
302- 'matching failed because Scope.conditionally() did not validate'
302+ 'matching failed because Scope.conditionally() did not validate' ,
303303 )
304304 return false
305305 }
306306
307307 const badHeaders = this . badheaders . filter (
308- header => header in options . headers
308+ header => header in options . headers ,
309309 )
310310
311311 if ( badHeaders . length ) {
@@ -322,7 +322,7 @@ module.exports = class Interceptor {
322322 const matchQueries = this . matchQuery ( { search } )
323323
324324 this . scope . logger (
325- matchQueries ? 'query matching succeeded' : 'query matching failed'
325+ matchQueries ? 'query matching succeeded' : 'query matching failed' ,
326326 )
327327
328328 if ( ! matchQueries ) {
@@ -369,7 +369,7 @@ module.exports = class Interceptor {
369369 "bodies don't match: \n" ,
370370 this . _requestBody ,
371371 '\n' ,
372- body
372+ body ,
373373 )
374374 }
375375 }
0 commit comments