From 1e6ab2c03c35608129611ed4eb0e95e05ed3f10d Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 11 May 2021 11:51:54 +0200 Subject: [PATCH] prettier --write '**/*.{js,json,md}' --- lib/unexpectedMessy.js | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/lib/unexpectedMessy.js b/lib/unexpectedMessy.js index 928f6d1..40a59ce 100644 --- a/lib/unexpectedMessy.js +++ b/lib/unexpectedMessy.js @@ -282,9 +282,8 @@ module.exports = { actualHeaderValue = actualHeaderValues[i]; outputHeader(headerName, actualHeaderValue); if (remainingExpectedHeaders.has(headerName)) { - const expectedHeaderValue = remainingExpectedHeaders.get( - headerName - ); + const expectedHeaderValue = + remainingExpectedHeaders.get(headerName); output .sp(actualHeaderValue === '' ? 0 : 1) .error('// should be ') @@ -420,9 +419,8 @@ module.exports = { Object.keys(promisesByHeaderNameAndValue).forEach(function ( headerName ) { - remainingSatisfySpecPromisesByHeaderNameAndValue[ - headerName - ] = {}; + remainingSatisfySpecPromisesByHeaderNameAndValue[headerName] = + {}; Object.keys(promisesByHeaderNameAndValue[headerName]).forEach( function (headerValue) { remainingSatisfySpecPromisesByHeaderNameAndValue[ @@ -484,17 +482,15 @@ module.exports = { } } // Second pass: Find changed headers - subjectHeaderValues = remainingSubjectHeaders.getAll( - headerName - ); + subjectHeaderValues = + remainingSubjectHeaders.getAll(headerName); if (subjectHeaderValues) { for (i = 0; i < subjectHeaderValues.length; i += 1) { subjectHeaderValue = subjectHeaderValues[i]; outputHeader(headerName, subjectHeaderValue); if (remainingExpectedHeaders.has(headerName)) { - const expectedHeaderValue = remainingExpectedHeaders.get( - headerName - ); // Will be the first if multiple + const expectedHeaderValue = + remainingExpectedHeaders.get(headerName); // Will be the first if multiple if (typeof expectedHeaderValue === 'undefined') { output .sp(subjectHeaderValue === '' ? 0 : 1) @@ -886,14 +882,14 @@ module.exports = { promiseByKey.unchunkedBody && promiseByKey.unchunkedBody.isRejected() ) { - const unchunkedBodyError = promiseByKey.unchunkedBody.reason(); + const unchunkedBodyError = + promiseByKey.unchunkedBody.reason(); output.nl().annotationBlock(function () { this.error('should have unchunked body satisfying') .sp() .append(inspect(value.unchunkedBody)); - const unchunkedBodyDiff = unchunkedBodyError.getDiff( - output - ); + const unchunkedBodyDiff = + unchunkedBodyError.getDiff(output); if (unchunkedBodyDiff) { this.nl().append(unchunkedBodyDiff); } @@ -1351,7 +1347,8 @@ module.exports = { ); } } else if (promiseByKey.requestLineSpec.isRejected()) { - const requestLineSpecError = promiseByKey.requestLineSpec.reason(); + const requestLineSpecError = + promiseByKey.requestLineSpec.reason(); requestLineDiff = requestLineSpecError.getDiff(output); if (requestLineDiff) { output.append(requestLineDiff); @@ -1753,7 +1750,8 @@ module.exports = { ); } } else if (promiseByKey.statusLineSpec.isRejected()) { - const statusLineSpecError = promiseByKey.statusLineSpec.reason(); + const statusLineSpecError = + promiseByKey.statusLineSpec.reason(); statusLineDiff = statusLineSpecError.getDiff(output); if (statusLineDiff) { output.append(statusLineDiff);