mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 19:36:58 -05:00
Update validate.test.ts
This commit is contained in:
@@ -29,14 +29,9 @@ describe('channels:validate', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('will show a message if the file contains a channel with wrong channel id', () => {
|
it('will show a message if the file contains a channel with wrong channel id', () => {
|
||||||
try {
|
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_channel_id.channels.xml`
|
||||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_channel_id.channels.xml`
|
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
expect(stdout).toContain(`
|
||||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
|
||||||
process.exit(1)
|
|
||||||
} catch (error) {
|
|
||||||
expect((error as ExecError).status).toBe(1)
|
|
||||||
expect((error as ExecError).stdout).toContain(`
|
|
||||||
┌─────────┬────────────────────┬──────┬────────────────────┬─────────┬─────────────────────┐
|
┌─────────┬────────────────────┬──────┬────────────────────┬─────────┬─────────────────────┐
|
||||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||||
├─────────┼────────────────────┼──────┼────────────────────┼─────────┼─────────────────────┤
|
├─────────┼────────────────────┼──────┼────────────────────┼─────────┼─────────────────────┤
|
||||||
@@ -45,18 +40,12 @@ describe('channels:validate', () => {
|
|||||||
|
|
||||||
1 problems (0 errors, 1 warnings) in 1 file(s)
|
1 problems (0 errors, 1 warnings) in 1 file(s)
|
||||||
`)
|
`)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('will show a message if the file contains a channel with wrong feed id', () => {
|
it('will show a message if the file contains a channel with wrong feed id', () => {
|
||||||
try {
|
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_feed_id.channels.xml`
|
||||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_feed_id.channels.xml`
|
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
expect(stdout).toContain(`
|
||||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
|
||||||
process.exit(1)
|
|
||||||
} catch (error) {
|
|
||||||
expect((error as ExecError).status).toBe(1)
|
|
||||||
expect((error as ExecError).stdout).toContain(`
|
|
||||||
┌─────────┬─────────────────┬──────┬─────────────────┬─────────┬─────────┐
|
┌─────────┬─────────────────┬──────┬─────────────────┬─────────┬─────────┐
|
||||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||||
├─────────┼─────────────────┼──────┼─────────────────┼─────────┼─────────┤
|
├─────────┼─────────────────┼──────┼─────────────────┼─────────┼─────────┤
|
||||||
@@ -65,6 +54,5 @@ describe('channels:validate', () => {
|
|||||||
|
|
||||||
1 problems (0 errors, 1 warnings) in 1 file(s)
|
1 problems (0 errors, 1 warnings) in 1 file(s)
|
||||||
`)
|
`)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user