Skip to content
Prev Previous commit
Next Next commit
Tame prettier
  • Loading branch information
pedrottimark committed Jan 28, 2018
commit c5f85698ae44154228fb326371d6da34d9e6651f
19 changes: 12 additions & 7 deletions packages/diff-sequences/src/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ const assertCommonItems = (
for (; nCommon !== 0; nCommon -= 1, aCommon += 1, bCommon += 1) {
if (a[aCommon] !== b[bCommon]) {
throw new Error(
`output item ${a[aCommon]} and ${
b[bCommon]
} is not common for aCommon=${aCommon} and bCommon=${bCommon}`,
`output item is not common for aCommon=${aCommon} and bCommon=${bCommon}`,
);
}
}
Expand Down Expand Up @@ -689,10 +687,17 @@ describe('common substrings', () => {
test('progress', () => {
// Confirm expected progress. If change is correct, then update test.
// A property value changes from an object to an array of objects.
const a = ['"sorting": Object {', '"ascending": true,'].join('\n');
const b = ['"sorting": Array [', 'Object {', '"descending": false,'].join(
'\n',
);
// prettier-ignore
const a = [
'"sorting": Object {',
'"ascending": true,',
].join('\n');
// prettier-ignore
const b = [
'"sorting": Array [',
'Object {',
'"descending": false,',
].join('\n');
const expected = ['"sorting": ', 'Object {\n"', 'scending": ', 'e,'];
const abCommonSubstrings = findCommonSubstrings(a, b);
const baCommonSubstrings = findCommonSubstrings(b, a);
Expand Down