diff --git a/packages/betterer/src/test/file-test/differ.ts b/packages/betterer/src/test/file-test/differ.ts index 09818c7cf..5e1a80406 100644 --- a/packages/betterer/src/test/file-test/differ.ts +++ b/packages/betterer/src/test/file-test/differ.ts @@ -12,6 +12,8 @@ import { BettererFileBase } from './types'; +const FORMATTER = Intl.NumberFormat(); + export function differ(expected: BettererFileTestResult, result: BettererFileTestResult): BettererFileTestDiff { const diff: BettererFilesDiff = {}; const expectedΩ = expected as BettererFileTestResultΩ; @@ -160,16 +162,18 @@ export function differ(expected: BettererFileTestResult, result: BettererFileTes logs.push({ warn: `${existing.length} existing ${getIssues(existing.length)} in "${filePath}".` }); } const newIssues = diff[filePath].new || []; - if (newIssues.length) { - const { length } = newIssues; - logs.push({ error: `${length} new ${getIssues(length)} in "${filePath}":` }); - - newIssues.map((issue) => { - const fileΩ = resultΩ.getFile(filePath) as BettererFileΩ; - const { fileText } = fileΩ; - const [line, column, length, message] = issue; - logs.push({ code: { message, filePath, fileText, line, column, length } }); - }); + const nIssues = newIssues.length; + if (nIssues) { + logs.push({ error: `New ${getIssues(nIssues)} in "${filePath}"!` }); + if (nIssues > 1) { + logs.push({ error: `Showing first of ${FORMATTER.format(nIssues)} new issues:` }); + } + + const [firstIssue] = newIssues; + const fileΩ = resultΩ.getFile(filePath) as BettererFileΩ; + const { fileText } = fileΩ; + const [line, column, length, message] = firstIssue; + logs.push({ code: { message, filePath, fileText, line, column, length } }); } }); diff --git a/test/__snapshots__/betterer-cache.spec.ts.snap b/test/__snapshots__/betterer-cache.spec.ts.snap index ddf767f5c..f23e49a22 100644 --- a/test/__snapshots__/betterer-cache.spec.ts.snap +++ b/test/__snapshots__/betterer-cache.spec.ts.snap @@ -214,7 +214,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 regexp no hack comments: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-cache/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-cache/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-cache/src/index.ts\\"! ・ ・ /fixtures/test-betterer-cache/src/index.ts ・ 1 | // HACK: @@ -235,7 +235,7 @@ Error: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 regexp no hack comments: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-cache/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-cache/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-cache/src/index.ts\\"! ・ ・ /fixtures/test-betterer-cache/src/index.ts ・ 1 | // HACK: @@ -256,7 +256,7 @@ Error: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 regexp no hack comments: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-cache/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-cache/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-cache/src/index.ts\\"! ・ ・ /fixtures/test-betterer-cache/src/index.ts ・ 1 | // HACK: diff --git a/test/__snapshots__/betterer-eslint.spec.ts.snap b/test/__snapshots__/betterer-eslint.spec.ts.snap index eb5033769..2239d9e9e 100644 --- a/test/__snapshots__/betterer-eslint.spec.ts.snap +++ b/test/__snapshots__/betterer-eslint.spec.ts.snap @@ -276,7 +276,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 eslint enable new rule: \\"eslint enable new rule\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\"! ・ ・ /fixtures/test-betterer-eslint/src/index.ts ・ 1 | debugger; @@ -297,7 +297,7 @@ Error: \\"eslint enable new rule\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 eslint enable new rule: \\"eslint enable new rule\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\"! ・ ・ /fixtures/test-betterer-eslint/src/index.ts ・ 1 | debugger; @@ -318,7 +318,7 @@ Error: \\"eslint enable new rule\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 eslint enable new rule: \\"eslint enable new rule\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-eslint/src/index.ts\\"! ・ ・ /fixtures/test-betterer-eslint/src/index.ts ・ 1 | debugger; @@ -663,7 +663,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 eslint enable no-debugger rule: \\"eslint enable no-debugger rule\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\"! ・ ・ /fixtures/test-betterer-eslint-complex/src/index.ts ・ 1 | debugger; @@ -684,7 +684,7 @@ Error: \\"eslint enable no-debugger rule\\" got worse. (1 new issue, 2 total) 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 eslint enable no-debugger rule: \\"eslint enable no-debugger rule\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\"! ・ ・ /fixtures/test-betterer-eslint-complex/src/index.ts ・ 1 | debugger; @@ -705,7 +705,7 @@ Error: \\"eslint enable no-debugger rule\\" got worse. (1 new issue, 2 total) 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 eslint enable no-debugger rule: \\"eslint enable no-debugger rule\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-eslint-complex/src/index.ts\\"! ・ ・ /fixtures/test-betterer-eslint-complex/src/index.ts ・ 1 | debugger; diff --git a/test/__snapshots__/betterer-file-test.spec.ts.snap b/test/__snapshots__/betterer-file-test.spec.ts.snap index 640e6e703..1c3065cb6 100644 --- a/test/__snapshots__/betterer-file-test.spec.ts.snap +++ b/test/__snapshots__/betterer-file-test.spec.ts.snap @@ -344,7 +344,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 file test custom goal: \\"file test custom goal\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\"! ・ ・ /fixtures/test-betterer-file-test-goal/src/index.ts ・ 1 | debugger; @@ -366,7 +366,7 @@ Error: \\"file test custom goal\\" got worse. (1 new issue, 3 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 file test custom goal: \\"file test custom goal\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\"! ・ ・ /fixtures/test-betterer-file-test-goal/src/index.ts ・ 1 | debugger; @@ -388,7 +388,7 @@ Error: \\"file test custom goal\\" got worse. (1 new issue, 3 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 file test custom goal: \\"file test custom goal\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-goal/src/index.ts\\"! ・ ・ /fixtures/test-betterer-file-test-goal/src/index.ts ・ 1 | debugger; @@ -778,7 +778,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... ✅ file test custom goal: \\"file test custom goal\\" got force updated. (1 new issue, 9 total) 🆙 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\"! ・ ・ /fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts ・ 1 | debugger; @@ -798,7 +798,7 @@ Array [ 🎉 Betterer (0ms): 1 test done! ✅ file test custom goal: \\"file test custom goal\\" got force updated. (1 new issue, 9 total) 🆙 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\"! ・ ・ /fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts ・ 1 | debugger; @@ -818,7 +818,7 @@ Array [ 🎉 Betterer (0ms): 1 test done! ✅ file test custom goal: \\"file test custom goal\\" got force updated. (1 new issue, 9 total) 🆙 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts\\"! ・ ・ /fixtures/test-betterer-file-test-sort-single-file-absolute/src/c.ts ・ 1 | debugger; @@ -977,7 +977,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... ✅ file test custom goal: \\"file test custom goal\\" got force updated. (1 new issue, 9 total) 🆙 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\"! ・ ・ /fixtures/test-betterer-file-test-sort-single-file/src/c.ts ・ 1 | debugger; @@ -997,7 +997,7 @@ Array [ 🎉 Betterer (0ms): 1 test done! ✅ file test custom goal: \\"file test custom goal\\" got force updated. (1 new issue, 9 total) 🆙 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\"! ・ ・ /fixtures/test-betterer-file-test-sort-single-file/src/c.ts ・ 1 | debugger; @@ -1017,7 +1017,7 @@ Array [ 🎉 Betterer (0ms): 1 test done! ✅ file test custom goal: \\"file test custom goal\\" got force updated. (1 new issue, 9 total) 🆙 ・ 2 existing issues in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\": +・ New issue in \\"/fixtures/test-betterer-file-test-sort-single-file/src/c.ts\\"! ・ ・ /fixtures/test-betterer-file-test-sort-single-file/src/c.ts ・ 1 | debugger; diff --git a/test/__snapshots__/betterer-regexp.spec.ts.snap b/test/__snapshots__/betterer-regexp.spec.ts.snap index 9ad194dcf..5ddff9d35 100644 --- a/test/__snapshots__/betterer-regexp.spec.ts.snap +++ b/test/__snapshots__/betterer-regexp.spec.ts.snap @@ -194,7 +194,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 regexp no hack comments: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\"! ・ ・ /fixtures/test-betterer-regexp/src/index.ts ・ 1 | // HACK: @@ -215,7 +215,7 @@ Error: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 regexp no hack comments: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\"! ・ ・ /fixtures/test-betterer-regexp/src/index.ts ・ 1 | // HACK: @@ -236,7 +236,7 @@ Error: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 regexp no hack comments: \\"regexp no hack comments\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-regexp/src/index.ts\\"! ・ ・ /fixtures/test-betterer-regexp/src/index.ts ・ 1 | // HACK: diff --git a/test/__snapshots__/betterer-stylelint.spec.ts.snap b/test/__snapshots__/betterer-stylelint.spec.ts.snap index b83e8d692..ebc7b4ca9 100644 --- a/test/__snapshots__/betterer-stylelint.spec.ts.snap +++ b/test/__snapshots__/betterer-stylelint.spec.ts.snap @@ -130,7 +130,8 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 stylelint enable new rule: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\". -・ 2 new issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\": +・ New issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\"! +・ Showing first of 2 new issues: ・ ・ /fixtures/test-betterer-stylelint/src/styles.scss ・ 12 | b & {} @@ -141,14 +142,6 @@ Array [ ・ 16 | ・ 17 | .foo { ・ -・ -・ /fixtures/test-betterer-stylelint/src/styles.scss -・ 16 | -・ 17 | .foo { -・ > 18 | width: 666borks; -・ | ^ Unexpected unknown unit \\"borks\\" (unit-no-unknown) -・ 19 | } -・ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 @@ -163,7 +156,8 @@ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 stylelint enable new rule: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\". -・ 2 new issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\": +・ New issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\"! +・ Showing first of 2 new issues: ・ ・ /fixtures/test-betterer-stylelint/src/styles.scss ・ 12 | b & {} @@ -174,14 +168,6 @@ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 ・ 16 | ・ 17 | .foo { ・ -・ -・ /fixtures/test-betterer-stylelint/src/styles.scss -・ 16 | -・ 17 | .foo { -・ > 18 | width: 666borks; -・ | ^ Unexpected unknown unit \\"borks\\" (unit-no-unknown) -・ 19 | } -・ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 @@ -196,7 +182,8 @@ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 stylelint enable new rule: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\". -・ 2 new issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\": +・ New issues in \\"/fixtures/test-betterer-stylelint/src/styles.scss\\"! +・ Showing first of 2 new issues: ・ ・ /fixtures/test-betterer-stylelint/src/styles.scss ・ 12 | b & {} @@ -207,14 +194,6 @@ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 ・ 16 | ・ 17 | .foo { ・ -・ -・ /fixtures/test-betterer-stylelint/src/styles.scss -・ 16 | -・ 17 | .foo { -・ > 18 | width: 666borks; -・ | ^ Unexpected unknown unit \\"borks\\" (unit-no-unknown) -・ 19 | } -・ Error: \\"stylelint enable new rule\\" got worse. (2 new issues, 4 total) 😔 diff --git a/test/__snapshots__/betterer-tsquery.spec.ts.snap b/test/__snapshots__/betterer-tsquery.spec.ts.snap index a7ef048c8..c516df6e4 100644 --- a/test/__snapshots__/betterer-tsquery.spec.ts.snap +++ b/test/__snapshots__/betterer-tsquery.spec.ts.snap @@ -194,7 +194,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\"! ・ ・ /fixtures/test-betterer-tsquery/src/index.ts ・ 1 | console.log('foo'); @@ -215,7 +215,7 @@ Error: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\"! ・ ・ /fixtures/test-betterer-tsquery/src/index.ts ・ 1 | console.log('foo'); @@ -236,7 +236,7 @@ Error: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-tsquery/src/index.ts\\"! ・ ・ /fixtures/test-betterer-tsquery/src/index.ts ・ 1 | console.log('foo'); diff --git a/test/__snapshots__/betterer-typescript-strict.spec.ts.snap b/test/__snapshots__/betterer-typescript-strict.spec.ts.snap index f3d496bbe..2fcba3c50 100644 --- a/test/__snapshots__/betterer-typescript-strict.spec.ts.snap +++ b/test/__snapshots__/betterer-typescript-strict.spec.ts.snap @@ -199,7 +199,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 7 total) 😔 ・ 6 existing issues in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\"! ・ ・ /fixtures/test-betterer-typescript-strict/src/index.ts ・ 32 | const a = 'a'; @@ -221,7 +221,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 7 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 7 total) 😔 ・ 6 existing issues in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\"! ・ ・ /fixtures/test-betterer-typescript-strict/src/index.ts ・ 32 | const a = 'a'; @@ -243,7 +243,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 7 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 7 total) 😔 ・ 6 existing issues in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-typescript-strict/src/index.ts\\"! ・ ・ /fixtures/test-betterer-typescript-strict/src/index.ts ・ 32 | const a = 'a'; diff --git a/test/__snapshots__/betterer-typescript.spec.ts.snap b/test/__snapshots__/betterer-typescript.spec.ts.snap index 0d8bb89cd..feb6e1016 100644 --- a/test/__snapshots__/betterer-typescript.spec.ts.snap +++ b/test/__snapshots__/betterer-typescript.spec.ts.snap @@ -194,7 +194,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\"! ・ ・ /fixtures/test-betterer-typescript/src/index.ts ・ 1 | const a = 'a'; @@ -216,7 +216,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\"! ・ ・ /fixtures/test-betterer-typescript/src/index.ts ・ 1 | const a = 'a'; @@ -238,7 +238,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-typescript/src/index.ts\\"! ・ ・ /fixtures/test-betterer-typescript/src/index.ts ・ 1 | const a = 'a'; diff --git a/test/__snapshots__/betterer-worse.spec.ts.snap b/test/__snapshots__/betterer-worse.spec.ts.snap index 85672a1da..b1cb1bef4 100644 --- a/test/__snapshots__/betterer-worse.spec.ts.snap +++ b/test/__snapshots__/betterer-worse.spec.ts.snap @@ -130,7 +130,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... ✅ tsquery no raw console.log: \\"tsquery no raw console.log\\" got force updated. (1 new issue, 2 total) 🆙 ・ 1 existing issue in \\"/fixtures/test-betterer-update/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-update/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-update/src/index.ts\\"! ・ ・ /fixtures/test-betterer-update/src/index.ts ・ 1 | console.log('foo'); @@ -149,7 +149,7 @@ Array [ 🎉 Betterer (0ms): 1 test done! ✅ tsquery no raw console.log: \\"tsquery no raw console.log\\" got force updated. (1 new issue, 2 total) 🆙 ・ 1 existing issue in \\"/fixtures/test-betterer-update/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-update/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-update/src/index.ts\\"! ・ ・ /fixtures/test-betterer-update/src/index.ts ・ 1 | console.log('foo'); @@ -168,7 +168,7 @@ Array [ 🎉 Betterer (0ms): 1 test done! ✅ tsquery no raw console.log: \\"tsquery no raw console.log\\" got force updated. (1 new issue, 2 total) 🆙 ・ 1 existing issue in \\"/fixtures/test-betterer-update/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-update/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-update/src/index.ts\\"! ・ ・ /fixtures/test-betterer-update/src/index.ts ・ 1 | console.log('foo'); @@ -377,7 +377,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\"! ・ ・ /fixtures/test-betterer-no-update/src/index.ts ・ 1 | console.log('foo'); @@ -398,7 +398,7 @@ Error: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\"! ・ ・ /fixtures/test-betterer-no-update/src/index.ts ・ 1 | console.log('foo'); @@ -419,7 +419,7 @@ Error: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-no-update/src/index.ts\\"! ・ ・ /fixtures/test-betterer-no-update/src/index.ts ・ 1 | console.log('foo'); diff --git a/test/cli/__snapshots__/betterer-ci.spec.ts.snap b/test/cli/__snapshots__/betterer-ci.spec.ts.snap index 90c8121c4..5c545b2b4 100644 --- a/test/cli/__snapshots__/betterer-ci.spec.ts.snap +++ b/test/cli/__snapshots__/betterer-ci.spec.ts.snap @@ -268,7 +268,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\"! ・ ・ /fixtures/test-betterer-ci-worse/src/index.ts ・ 2 | const one = 1; @@ -290,7 +290,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\"! ・ ・ /fixtures/test-betterer-ci-worse/src/index.ts ・ 2 | const one = 1; @@ -312,7 +312,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-ci-worse/src/index.ts\\"! ・ ・ /fixtures/test-betterer-ci-worse/src/index.ts ・ 2 | const one = 1; diff --git a/test/cli/__snapshots__/betterer-precommit.spec.ts.snap b/test/cli/__snapshots__/betterer-precommit.spec.ts.snap index 6b08383a3..39ff02028 100644 --- a/test/cli/__snapshots__/betterer-precommit.spec.ts.snap +++ b/test/cli/__snapshots__/betterer-precommit.spec.ts.snap @@ -255,7 +255,7 @@ Array [ 🌟 Betterer (0ms): 1 test running... 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\"! ・ ・ /fixtures/test-betterer-precommit-worse/src/index.ts ・ 2 | const one = 1; @@ -277,7 +277,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\"! ・ ・ /fixtures/test-betterer-precommit-worse/src/index.ts ・ 2 | const one = 1; @@ -299,7 +299,7 @@ Error: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 typescript use strict mode: \\"typescript use strict mode\\" got worse. (1 new issue, 2 total) 😔 ・ 1 existing issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-precommit-worse/src/index.ts\\"! ・ ・ /fixtures/test-betterer-precommit-worse/src/index.ts ・ 2 | const one = 1; diff --git a/test/watch/__snapshots__/betterer-watch.spec.ts.snap b/test/watch/__snapshots__/betterer-watch.spec.ts.snap index f3b612a8f..209e59dcd 100644 --- a/test/watch/__snapshots__/betterer-watch.spec.ts.snap +++ b/test/watch/__snapshots__/betterer-watch.spec.ts.snap @@ -407,7 +407,7 @@ Checking 1 file... 🤔 🌟 Betterer (0ms): 1 test running... 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-watch/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-watch/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-watch/src/index.ts\\"! ・ ・ /fixtures/test-betterer-watch/src/index.ts ・ 1 | console.log('foo'); @@ -437,7 +437,7 @@ Checking 1 file... 🤔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-watch/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-watch/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-watch/src/index.ts\\"! ・ ・ /fixtures/test-betterer-watch/src/index.ts ・ 1 | console.log('foo'); @@ -467,7 +467,7 @@ Checked 1 file! 🔍 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-watch/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-watch/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-watch/src/index.ts\\"! ・ ・ /fixtures/test-betterer-watch/src/index.ts ・ 1 | console.log('foo'); @@ -501,7 +501,7 @@ Checking 1 file... 🤔 💥 Betterer (0ms): 1 test done! 1 test errored! 🔥 tsquery no raw console.log: \\"tsquery no raw console.log\\" got worse. (1 new issue, 3 total) 😔 ・ 2 existing issues in \\"/fixtures/test-betterer-watch/src/index.ts\\". -・ 1 new issue in \\"/fixtures/test-betterer-watch/src/index.ts\\": +・ New issue in \\"/fixtures/test-betterer-watch/src/index.ts\\"! ・ ・ /fixtures/test-betterer-watch/src/index.ts ・ 1 | console.log('foo');