Update update-guides.js

This commit is contained in:
Aleksandr Statciuk 2022-01-14 17:13:20 +03:00
parent e3e0ef3b9b
commit 5a19880855
5 changed files with 67 additions and 211 deletions

View file

@ -15,24 +15,16 @@ beforeEach(() => {
'tests/__data__/temp/database/programs.db'
)
const r = execSync(
execSync(
'DB_DIR=tests/__data__/temp/database PUBLIC_DIR=tests/__data__/output node scripts/commands/update-guides.js',
{ encoding: 'utf8' }
)
console.log(r)
})
afterEach(() => {
fs.rmdirSync('tests/__data__/temp', { recursive: true })
})
fit('can generate epg.xml', () => {
const output = content('tests/__data__/output/epg.xml')
const expected = content('tests/__data__/expected/epg.xml')
expect(output).toBe(expected)
})
it('can generate /guides', () => {
const output1 = content('tests/__data__/output/guides/us/magticom.ge.epg.xml')
const expected1 = content('tests/__data__/expected/guides/us/magticom.ge.epg.xml')