diff --git a/tests/commands/report/create.test.ts b/tests/commands/report/create.test.ts index 3c71b0ca41..704292b2e8 100644 --- a/tests/commands/report/create.test.ts +++ b/tests/commands/report/create.test.ts @@ -10,7 +10,8 @@ describe('report:create', () => { if (process.env.DEBUG === 'true') console.log(cmd, stdout) expect( - stdout.includes(` + normalize(stdout).includes( + normalize(` ┌─────────┬─────────────┬──────────────────┬─────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────┐ │ (index) │ issueNumber │ type │ streamId │ streamUrl │ status │ ├─────────┼─────────────┼──────────────────┼─────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────┤ @@ -26,7 +27,12 @@ describe('report:create', () => { │ 9 │ 20956 │ 'channel search' │ 'IONTV.us' │ undefined │ 'fulfilled' │ │ 10 │ 25157 │ 'streams:add' │ 'OnTimeSports.eg@SD' │ 'OnTime Sports SD.mu38' │ 'invalid_stream_url' │ │ 11 │ 39097 │ 'streams:edit' │ '~' │ 'https://jmp2.uk/plu-5a74b8e1e22a61737979c6bf.m3u8' │ 'nonexistent_link' │ -└─────────┴─────────────┴──────────────────┴─────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┘`) +└─────────┴─────────────┴──────────────────┴─────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┘`).trim() + ) ).toBe(true) }) }) + +function normalize(text: string) { + return text.replace(/\r\n/g, '\n') +}