diff --git a/e2e/formatters-test.js b/e2e/formatters-test.js index 51bafbe3..f691e39f 100644 --- a/e2e/formatters-test.js +++ b/e2e/formatters-test.js @@ -107,7 +107,7 @@ describe('e2e', function () { const joinedFoo = foo1Output.concat(foo2Output) let expectedLine - for (let i = 0; i < reportLines.length - 3; i++) { + for (let i = 0; i < reportLines.length - 7; i++) { expectedLine = `${joinedFoo[i].filePath}:${joinedFoo[i].line}:${joinedFoo[i].column}: ${joinedFoo[i].message} [${joinedFoo[i].severity}/${joinedFoo[i].ruleId}]` expect(reportLines[i]).to.equal(expectedLine) } @@ -115,7 +115,7 @@ describe('e2e', function () { expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS) const finalLine = '10 problem/s (1 error/s, 9 warning/s)' - expect(reportLines[reportLines.length - 2]).to.contain(finalLine) + expect(reportLines[reportLines.length - 6]).to.contain(finalLine) }) }) @@ -198,14 +198,14 @@ describe('e2e', function () { const reportLines = stdout.split('\n') let expectedLine - for (let i = 0; i < reportLines.length - 3; i++) { + for (let i = 0; i < reportLines.length - 7; i++) { expectedLine = `${foo2Output[i].filePath}: line ${foo2Output[i].line}, col ${foo2Output[i].column}, ${foo2Output[i].severity} - ${foo2Output[i].message} (${foo2Output[i].ruleId})` expect(reportLines[i]).to.equal(expectedLine) } expect(code).to.equal(EXIT_CODES.OK) const finalLine = '3 problem/s (3 warning/s)' - expect(reportLines[reportLines.length - 2]).to.equal(finalLine) + expect(reportLines[reportLines.length - 6]).to.equal(finalLine) }) it('should make the output report with compact formatter for Foo and Foo2 and Foo3', () => { const { code, stdout } = shell.exec( @@ -216,7 +216,7 @@ describe('e2e', function () { const joinedFoo = foo1Output.concat(foo2Output) let expectedLine - for (let i = 0; i < reportLines.length - 3; i++) { + for (let i = 0; i < reportLines.length - 7; i++) { expectedLine = `${joinedFoo[i].filePath}: line ${joinedFoo[i].line}, col ${joinedFoo[i].column}, ${joinedFoo[i].severity} - ${joinedFoo[i].message} (${joinedFoo[i].ruleId})` expect(reportLines[i]).to.equal(expectedLine) } @@ -224,7 +224,7 @@ describe('e2e', function () { expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS) const finalLine = '10 problem/s (1 error/s, 9 warning/s)' - expect(reportLines[reportLines.length - 2]).to.contain(finalLine) + expect(reportLines[reportLines.length - 6]).to.contain(finalLine) }) }) @@ -256,7 +256,7 @@ describe('e2e', function () { let expectedLine = foo2Output[0].filePath expect(reportLines[1]).to.equal(expectedLine) - for (let i = 2; i < reportLines.length - 4; i++) { + for (let i = 2; i < reportLines.length - 8; i++) { expectedLine = ` ${foo2Output[i - 2].line}:${foo2Output[i - 2].column} ${foo2Output[ i - 2 ].severity.toLowerCase()} ${foo2Output[i - 2].message} ${foo2Output[i - 2].ruleId}` @@ -266,7 +266,7 @@ describe('e2e', function () { expect(code).to.equal(EXIT_CODES.OK) const finalLine = '\u2716 3 problems (0 errors, 3 warnings)' - expect(reportLines[reportLines.length - 3]).to.equal(finalLine) + expect(reportLines[reportLines.length - 7]).to.equal(finalLine) }) it('should make the output report with stylish formatter for Foo and Foo2 and Foo3', () => { const { code, stdout } = shell.exec( @@ -286,7 +286,7 @@ describe('e2e', function () { reportLines.splice(9, 2) reportLines.splice(1, 1) - for (let i = 1; i < reportLines.length - 4; i++) { + for (let i = 1; i < reportLines.length - 8; i++) { expectedLine = ` ${joinedFoo[i - 1].line}:${joinedFoo[i - 1].column} ${joinedFoo[ i - 1 ].severity.toLowerCase()} ${joinedFoo[i - 1].message} ${joinedFoo[i - 1].ruleId}` @@ -296,7 +296,7 @@ describe('e2e', function () { expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS) const finalLine = '\u2716 10 problems (1 error, 9 warnings)' - expect(reportLines[reportLines.length - 3]).to.equal(finalLine) + expect(reportLines[reportLines.length - 7]).to.equal(finalLine) }) })