mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
wip
This commit is contained in:
parent
f8981e478e
commit
043d738c95
14 changed files with 134 additions and 9 deletions
|
@ -15,10 +15,11 @@ beforeEach(() => {
|
|||
'tests/__data__/temp/database/programs.db'
|
||||
)
|
||||
|
||||
execSync(
|
||||
const results = execSync(
|
||||
'DB_DIR=tests/__data__/temp/database GUIDES_DIR=tests/__data__/output/guides node scripts/commands/update-guides.js',
|
||||
{ encoding: 'utf8' }
|
||||
)
|
||||
// console.log(results)
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
|
@ -32,6 +33,18 @@ it('can generate epg.xml', () => {
|
|||
expect(output).toBe(expected)
|
||||
})
|
||||
|
||||
it('can generate /countries guides', () => {
|
||||
const output1 = content('tests/__data__/output/guides/countries/us.epg.xml')
|
||||
const expected1 = content('tests/__data__/expected/guides/countries/us.epg.xml')
|
||||
|
||||
expect(output1).toBe(expected1)
|
||||
|
||||
const output2 = content('tests/__data__/output/guides/countries/za.epg.xml')
|
||||
const expected2 = content('tests/__data__/expected/guides/countries/za.epg.xml')
|
||||
|
||||
expect(output2).toBe(expected2)
|
||||
})
|
||||
|
||||
function content(filepath) {
|
||||
const data = fs.readFileSync(path.resolve(filepath), {
|
||||
encoding: 'utf8'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue