From 5f8f2509c1b9aeef8b3cef741d098b44b270db7d Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Sun, 15 Dec 2024 06:17:31 +0300 Subject: [PATCH] Update validate.test.ts --- tests/commands/channels/validate.test.ts | 32 ++++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/tests/commands/channels/validate.test.ts b/tests/commands/channels/validate.test.ts index 0177a6e5..56598267 100644 --- a/tests/commands/channels/validate.test.ts +++ b/tests/commands/channels/validate.test.ts @@ -19,13 +19,21 @@ describe('channels:validate', () => { process.exit(1) } catch (error) { expect((error as ExecError).status).toBe(1) - expect((error as ExecError).stdout).toContain(`duplicate.channels.xml + expect((error as ExecError).stdout).toContain(` +> channels:validate +> npx tsx scripts/commands/channels/validate.ts --channels=tests/__data__/input/channels-validate/duplicate.channels.xml + +options: + channels: tests/__data__/input/channels-validate/duplicate.channels.xml +tests/__data__/input/channels-validate/duplicate.channels.xml ┌─────────┬─────────────┬──────┬────────────────┬─────────┬─────────┐ -│ (index) │ type │ lang │ xmltv_id │ site_id │ name │ +│ (index) │ type │ lang │ xmltv_id │ site_id │ name │ ├─────────┼─────────────┼──────┼────────────────┼─────────┼─────────┤ -│ 0 │ 'duplicate' │ 'en' │ 'BravoEast.us' │ '140' │ 'Bravo' │ +│ 0 │ 'duplicate' │ 'en' │ 'BravoEast.us' │ '140' │ 'Bravo' │ └─────────┴─────────────┴──────┴────────────────┴─────────┴─────────┘ -\n1 error(s) in 1 file(s)\n`) + +1 error(s) in 1 file(s) +`) } }) @@ -36,13 +44,21 @@ describe('channels:validate', () => { process.exit(1) } catch (error) { expect((error as ExecError).status).toBe(1) - expect((error as ExecError).stdout).toContain(`wrong_xmltv_id.channels.xml + expect((error as ExecError).stdout).toContain(` +> channels:validate +> npx tsx scripts/commands/channels/validate.ts --channels=tests/__data__/input/channels-validate/wrong_xmltv_id.channels.xml + +options: + channels: tests/__data__/input/channels-validate/wrong_xmltv_id.channels.xml +tests/__data__/input/channels-validate/wrong_xmltv_id.channels.xml ┌─────────┬──────────────────┬──────┬────────────────────┬─────────┬─────────────────────┐ -│ (index) │ type │ lang │ xmltv_id │ site_id │ name │ +│ (index) │ type │ lang │ xmltv_id │ site_id │ name │ ├─────────┼──────────────────┼──────┼────────────────────┼─────────┼─────────────────────┤ -│ 0 │ 'wrong_xmltv_id' │ 'en' │ 'CNNInternational' │ '140' │ 'CNN International' │ +│ 0 │ 'wrong_xmltv_id' │ 'en' │ 'CNNInternational' │ '140' │ 'CNN International' │ └─────────┴──────────────────┴──────┴────────────────────┴─────────┴─────────────────────┘ -\n1 error(s) in 1 file(s)\n`) + +1 error(s) in 1 file(s) +`) } }) })