mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
Update tests
This commit is contained in:
parent
510d89c8c8
commit
37664b49b9
8 changed files with 56 additions and 67 deletions
|
@ -5,20 +5,20 @@ import { pathToFileURL } from 'node:url'
|
|||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync(
|
||||
'tests/__data__/input/channels-parse/channels-parse.channels.xml',
|
||||
'tests/__data__/output/channels.xml'
|
||||
'tests/__data__/input/channels_parse/example.com.channels.xml',
|
||||
'tests/__data__/output/example.com.channels.xml'
|
||||
)
|
||||
})
|
||||
|
||||
describe('channels:parse', () => {
|
||||
it('can parse channels', () => {
|
||||
const cmd =
|
||||
'npm run channels:parse --- --config=tests/__data__/input/channels-parse/channels-parse.config.js --output=tests/__data__/output/channels.xml'
|
||||
'npm run channels:parse --- --config=tests/__data__/input/channels_parse/example.com.config.js --output=tests/__data__/output/example.com.channels.xml'
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/channels.xml')).toEqual(
|
||||
content('tests/__data__/expected/sites/channels-parse/channels-parse.channels.xml')
|
||||
expect(content('tests/__data__/output/example.com.channels.xml')).toEqual(
|
||||
content('tests/__data__/expected/channels_parse/example.com.channels.xml')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue