mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update validate.test.ts
This commit is contained in:
parent
d92b106514
commit
43b6679fa0
1 changed files with 24 additions and 8 deletions
|
@ -19,13 +19,21 @@ describe('channels:validate', () => {
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
expect((error as ExecError).status).toBe(1)
|
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)
|
process.exit(1)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
expect((error as ExecError).status).toBe(1)
|
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)
|
||||||
|
`)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue