mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
wip
This commit is contained in:
parent
e7873963c8
commit
d523210bb7
2 changed files with 63 additions and 39 deletions
|
@ -24,3 +24,25 @@ it('can generate channels.json', () => {
|
|||
country: 'AD'
|
||||
})
|
||||
})
|
||||
|
||||
it('can generate programs.json', () => {
|
||||
const result = execSync(
|
||||
'PUBLIC_DIR=tests/__data__/output DB_DIR=tests/__data__/input/database node scripts/commands/generate-guides.js',
|
||||
{ encoding: 'utf8' }
|
||||
)
|
||||
const json = fs.readFileSync(path.resolve('tests/__data__/output/api/programs.json'), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
const parsed = JSON.parse(json)
|
||||
const program = parsed['AndorraTV.ad'][0]
|
||||
expect(Object.keys(program).sort()).toEqual([
|
||||
'categories',
|
||||
'channel',
|
||||
'description',
|
||||
'icons',
|
||||
'site',
|
||||
'start',
|
||||
'stop',
|
||||
'title'
|
||||
])
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue