diff --git a/src/linter/tests/reporters/console.test.mjs b/src/linter/tests/reporters/console.test.mjs index 4960c9df..cde6024f 100644 --- a/src/linter/tests/reporters/console.test.mjs +++ b/src/linter/tests/reporters/console.test.mjs @@ -13,14 +13,14 @@ describe('console', () => { assert.strictEqual(process.stdout.write.mock.callCount(), 3); - const callsArgs = process.stdout.write.mock.calls.map( - call => call.arguments[0] + const callsArgs = process.stdout.write.mock.calls.map(call => + call.arguments[0].trim() ); assert.deepStrictEqual(callsArgs, [ - '\x1B[90mThis is a INFO issue at doc/api/test.md\x1B[39m\n', - '\x1B[33mThis is a WARN issue at doc/api/test.md (1:1)\x1B[39m\n', - '\x1B[31mThis is a ERROR issue at doc/api/test.md (1:1)\x1B[39m\n', + '\x1B[90mThis is a INFO issue at doc/api/test.md\x1B[39m', + '\x1B[33mThis is a WARN issue at doc/api/test.md (1:1)\x1B[39m', + '\x1B[31mThis is a ERROR issue at doc/api/test.md (1:1)\x1B[39m', ]); }); }); diff --git a/src/linter/tests/reporters/gihub.test.mjs b/src/linter/tests/reporters/github.test.mjs similarity index 78% rename from src/linter/tests/reporters/gihub.test.mjs rename to src/linter/tests/reporters/github.test.mjs index 09e3e4b3..94c92712 100644 --- a/src/linter/tests/reporters/gihub.test.mjs +++ b/src/linter/tests/reporters/github.test.mjs @@ -13,14 +13,14 @@ describe('github', () => { assert.strictEqual(process.stdout.write.mock.callCount(), 3); - const callsArgs = process.stdout.write.mock.calls.map( - call => call.arguments[0] + const callsArgs = process.stdout.write.mock.calls.map(call => + call.arguments[0].trim() ); assert.deepStrictEqual(callsArgs, [ - '::notice file=doc/api/test.md::This is a INFO issue\n', - '::warning file=doc/api/test.md,line=1,endLine=1::This is a WARN issue\n', - '::error file=doc/api/test.md,line=1,endLine=1::This is a ERROR issue\n', + '::notice file=doc/api/test.md::This is a INFO issue', + '::warning file=doc/api/test.md,line=1,endLine=1::This is a WARN issue', + '::error file=doc/api/test.md,line=1,endLine=1::This is a ERROR issue', ]); }); });