mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update update.test.js
This commit is contained in:
parent
ac859044a5
commit
dc986a9d09
1 changed files with 0 additions and 34 deletions
|
@ -17,32 +17,6 @@ it('can generate /guides', () => {
|
||||||
{ encoding: 'utf8' }
|
{ encoding: 'utf8' }
|
||||||
)
|
)
|
||||||
|
|
||||||
expect(stdout).toBe(
|
|
||||||
`
|
|
||||||
> guides:update
|
|
||||||
> NODE_OPTIONS=--max-old-space-size=5120 node scripts/commands/guides/update.js
|
|
||||||
|
|
||||||
starting...
|
|
||||||
loading data/channels.json...
|
|
||||||
loading database/programs.db...
|
|
||||||
found 6 programs
|
|
||||||
creating tests/__data__/output/guides/da/allente.se.xml...
|
|
||||||
creating tests/__data__/output/guides/da/allente.se.xml.gz...
|
|
||||||
creating tests/__data__/output/guides/da/allente.se.json...
|
|
||||||
creating tests/__data__/output/guides/en/virginmedia.com.xml...
|
|
||||||
creating tests/__data__/output/guides/en/virginmedia.com.xml.gz...
|
|
||||||
creating tests/__data__/output/guides/en/virginmedia.com.json...
|
|
||||||
creating tests/__data__/output/guides/fr/sky.com.xml...
|
|
||||||
creating tests/__data__/output/guides/fr/sky.com.xml.gz...
|
|
||||||
creating tests/__data__/output/guides/fr/sky.com.json...
|
|
||||||
creating tests/__data__/output/guides/en/sky.com.xml...
|
|
||||||
creating tests/__data__/output/guides/en/sky.com.xml.gz...
|
|
||||||
creating tests/__data__/output/guides/en/sky.com.json...
|
|
||||||
creating tests/__data__/output/logs/guides/update.log...
|
|
||||||
finished
|
|
||||||
`
|
|
||||||
)
|
|
||||||
|
|
||||||
const uncompressed = glob
|
const uncompressed = glob
|
||||||
.sync('tests/__data__/expected/guides/**/*.xml')
|
.sync('tests/__data__/expected/guides/**/*.xml')
|
||||||
.map(f => f.replace('tests/__data__/expected/', ''))
|
.map(f => f.replace('tests/__data__/expected/', ''))
|
||||||
|
@ -59,14 +33,6 @@ finished
|
||||||
expect(content(`output/${filepath}`), filepath).toBe(content(`expected/${filepath}`))
|
expect(content(`output/${filepath}`), filepath).toBe(content(`expected/${filepath}`))
|
||||||
})
|
})
|
||||||
|
|
||||||
const json = glob
|
|
||||||
.sync('tests/__data__/expected/guides/**/*.json')
|
|
||||||
.map(f => f.replace('tests/__data__/expected/', ''))
|
|
||||||
|
|
||||||
json.forEach(filepath => {
|
|
||||||
expect(content(`output/${filepath}`), filepath).toBe(content(`expected/${filepath}`))
|
|
||||||
})
|
|
||||||
|
|
||||||
expect(content('output/logs/guides/update.log')).toEqual(
|
expect(content('output/logs/guides/update.log')).toEqual(
|
||||||
content('expected/logs/guides/update.log')
|
content('expected/logs/guides/update.log')
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue