Update update-api.js

This commit is contained in:
Aleksandr Statciuk 2022-01-14 16:44:06 +03:00
parent b344682046
commit e3e0ef3b9b
2 changed files with 6 additions and 82 deletions

View file

@ -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'