mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-api.js
This commit is contained in:
parent
b344682046
commit
e3e0ef3b9b
2 changed files with 6 additions and 82 deletions
|
@ -10,10 +10,6 @@ beforeEach(() => {
|
|||
'tests/__data__/input/database/channels.db',
|
||||
'tests/__data__/temp/database/channels.db'
|
||||
)
|
||||
fs.copyFileSync(
|
||||
'tests/__data__/input/database/programs.db',
|
||||
'tests/__data__/temp/database/programs.db'
|
||||
)
|
||||
|
||||
execSync(
|
||||
'DB_DIR=tests/__data__/temp/database API_DIR=tests/__data__/output/api node scripts/commands/update-api.js',
|
||||
|
@ -32,13 +28,6 @@ it('can generate channels.json', () => {
|
|||
expect(output).toBe(expected)
|
||||
})
|
||||
|
||||
it('can generate programs.json', () => {
|
||||
const output = content('tests/__data__/output/api/programs.json')
|
||||
const expected = content('tests/__data__/expected/api/programs.json')
|
||||
|
||||
expect(output).toBe(expected)
|
||||
})
|
||||
|
||||
function content(filepath) {
|
||||
const data = fs.readFileSync(path.resolve(filepath), {
|
||||
encoding: 'utf8'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue