Skip to content

Commit 0248080

Browse files
author
dbale-altoros
committed
feature: duplicated import rule
1 parent 9add7b5 commit 0248080

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

e2e/formatters-test.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ describe('e2e', function () {
107107
const joinedFoo = foo1Output.concat(foo2Output)
108108
let expectedLine
109109

110-
for (let i = 0; i < reportLines.length - 3; i++) {
110+
for (let i = 0; i < reportLines.length - 7; i++) {
111111
expectedLine = `${joinedFoo[i].filePath}:${joinedFoo[i].line}:${joinedFoo[i].column}: ${joinedFoo[i].message} [${joinedFoo[i].severity}/${joinedFoo[i].ruleId}]`
112112
expect(reportLines[i]).to.equal(expectedLine)
113113
}
114114
// because there's an error
115115
expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS)
116116

117117
const finalLine = '10 problem/s (1 error/s, 9 warning/s)'
118-
expect(reportLines[reportLines.length - 2]).to.contain(finalLine)
118+
expect(reportLines[reportLines.length - 6]).to.contain(finalLine)
119119
})
120120
})
121121

@@ -198,14 +198,14 @@ describe('e2e', function () {
198198
const reportLines = stdout.split('\n')
199199
let expectedLine
200200

201-
for (let i = 0; i < reportLines.length - 3; i++) {
201+
for (let i = 0; i < reportLines.length - 7; i++) {
202202
expectedLine = `${foo2Output[i].filePath}: line ${foo2Output[i].line}, col ${foo2Output[i].column}, ${foo2Output[i].severity} - ${foo2Output[i].message} (${foo2Output[i].ruleId})`
203203
expect(reportLines[i]).to.equal(expectedLine)
204204
}
205205
expect(code).to.equal(EXIT_CODES.OK)
206206

207207
const finalLine = '3 problem/s (3 warning/s)'
208-
expect(reportLines[reportLines.length - 2]).to.equal(finalLine)
208+
expect(reportLines[reportLines.length - 6]).to.equal(finalLine)
209209
})
210210
it('should make the output report with compact formatter for Foo and Foo2 and Foo3', () => {
211211
const { code, stdout } = shell.exec(
@@ -216,15 +216,15 @@ describe('e2e', function () {
216216
const joinedFoo = foo1Output.concat(foo2Output)
217217
let expectedLine
218218

219-
for (let i = 0; i < reportLines.length - 3; i++) {
219+
for (let i = 0; i < reportLines.length - 7; i++) {
220220
expectedLine = `${joinedFoo[i].filePath}: line ${joinedFoo[i].line}, col ${joinedFoo[i].column}, ${joinedFoo[i].severity} - ${joinedFoo[i].message} (${joinedFoo[i].ruleId})`
221221
expect(reportLines[i]).to.equal(expectedLine)
222222
}
223223
// because there's an error
224224
expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS)
225225

226226
const finalLine = '10 problem/s (1 error/s, 9 warning/s)'
227-
expect(reportLines[reportLines.length - 2]).to.contain(finalLine)
227+
expect(reportLines[reportLines.length - 6]).to.contain(finalLine)
228228
})
229229
})
230230

@@ -256,7 +256,7 @@ describe('e2e', function () {
256256
let expectedLine = foo2Output[0].filePath
257257
expect(reportLines[1]).to.equal(expectedLine)
258258

259-
for (let i = 2; i < reportLines.length - 4; i++) {
259+
for (let i = 2; i < reportLines.length - 8; i++) {
260260
expectedLine = ` ${foo2Output[i - 2].line}:${foo2Output[i - 2].column} ${foo2Output[
261261
i - 2
262262
].severity.toLowerCase()} ${foo2Output[i - 2].message} ${foo2Output[i - 2].ruleId}`
@@ -266,7 +266,7 @@ describe('e2e', function () {
266266
expect(code).to.equal(EXIT_CODES.OK)
267267

268268
const finalLine = '\u2716 3 problems (0 errors, 3 warnings)'
269-
expect(reportLines[reportLines.length - 3]).to.equal(finalLine)
269+
expect(reportLines[reportLines.length - 7]).to.equal(finalLine)
270270
})
271271
it('should make the output report with stylish formatter for Foo and Foo2 and Foo3', () => {
272272
const { code, stdout } = shell.exec(
@@ -286,7 +286,7 @@ describe('e2e', function () {
286286
reportLines.splice(9, 2)
287287
reportLines.splice(1, 1)
288288

289-
for (let i = 1; i < reportLines.length - 4; i++) {
289+
for (let i = 1; i < reportLines.length - 8; i++) {
290290
expectedLine = ` ${joinedFoo[i - 1].line}:${joinedFoo[i - 1].column} ${joinedFoo[
291291
i - 1
292292
].severity.toLowerCase()} ${joinedFoo[i - 1].message} ${joinedFoo[i - 1].ruleId}`
@@ -296,7 +296,7 @@ describe('e2e', function () {
296296
expect(code).to.equal(EXIT_CODES.REPORTED_ERRORS)
297297

298298
const finalLine = '\u2716 10 problems (1 error, 9 warnings)'
299-
expect(reportLines[reportLines.length - 3]).to.equal(finalLine)
299+
expect(reportLines[reportLines.length - 7]).to.equal(finalLine)
300300
})
301301
})
302302

0 commit comments

Comments
 (0)