mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
Create tests
This commit is contained in:
parent
42d8a670d2
commit
9bd944c2ff
21 changed files with 732 additions and 0 deletions
16
tests/commands/validate.test.js
Normal file
16
tests/commands/validate.test.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const { execSync } = require('child_process')
|
||||
|
||||
it('can validate channels name', () => {
|
||||
try {
|
||||
execSync('node scripts/commands/validate.js --input-dir=tests/__data__/input/channels', {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
} catch (err) {
|
||||
expect(err.status).toBe(1)
|
||||
expect(err.stdout).toBe(
|
||||
`tests/__data__/input/channels/us_blocked.m3u:2 'Fox Sports' is on the blocklist due to claims of copyright holders (https://github.com/github/dmca/blob/master/2020/09/2020-09-16-dfl.md)\n\n`
|
||||
)
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue