Update validate.test.ts

This commit is contained in:
freearhey 2023-10-15 10:35:13 +03:00
parent 6e2cc42bc6
commit 1757fa378c

View file

@ -19,16 +19,13 @@ 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( expect((error as ExecError).stdout).toContain(`duplicate.channels.xml
(error as ExecError).stdout
.includes(`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`) \n1 error(s) in 1 file(s)\n`)
).toBe(true)
} }
}) })
@ -39,16 +36,13 @@ 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( expect((error as ExecError).stdout).toContain(`wrong_xmltv_id.channels.xml
(error as ExecError).stdout
.includes(`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`) \n1 error(s) in 1 file(s)\n`)
).toBe(true)
} }
}) })
}) })