Skip to content

Commit

Permalink
prettier --write '**/*.{js,json,md}'
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed May 11, 2021
1 parent f3c8b0a commit 1e6ab2c
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions lib/unexpectedMessy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ')
Expand Down Expand Up @@ -420,9 +419,8 @@ module.exports = {
Object.keys(promisesByHeaderNameAndValue).forEach(function (
headerName
) {
remainingSatisfySpecPromisesByHeaderNameAndValue[
headerName
] = {};
remainingSatisfySpecPromisesByHeaderNameAndValue[headerName] =
{};
Object.keys(promisesByHeaderNameAndValue[headerName]).forEach(
function (headerValue) {
remainingSatisfySpecPromisesByHeaderNameAndValue[
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1e6ab2c

Please sign in to comment.