mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
Update update-database.test.js
This commit is contained in:
parent
385b087ac0
commit
cc7fd8387e
1 changed files with 13 additions and 1 deletions
|
@ -5,7 +5,7 @@ const { execSync } = require('child_process')
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.rmdirSync('tests/__data__/temp', { recursive: true })
|
fs.rmdirSync('tests/__data__/temp', { recursive: true })
|
||||||
fs.mkdirSync('tests/__data__/temp')
|
fs.mkdirSync('tests/__data__/temp')
|
||||||
fs.copyFileSync('tests/__data__/input/test.db', 'tests/__data__/temp/test.db')
|
fs.copyFileSync('tests/__data__/input/update.db', 'tests/__data__/temp/test.db')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can update database', () => {
|
it('can update database', () => {
|
||||||
|
@ -94,4 +94,16 @@ it('can update database', () => {
|
||||||
updated: true,
|
updated: true,
|
||||||
cluster_id: 1
|
cluster_id: 1
|
||||||
})
|
})
|
||||||
|
expect(JSON.parse(lines[4])).toMatchObject({
|
||||||
|
id: 'KayhanTV.af',
|
||||||
|
status: { label: 'Timeout', code: 'timeout', level: 4 },
|
||||||
|
is_broken: true,
|
||||||
|
updated: true
|
||||||
|
})
|
||||||
|
expect(JSON.parse(lines[5])).toMatchObject({
|
||||||
|
id: 'Sharq.af',
|
||||||
|
status: { label: 'Offline', code: 'offline', level: 5 },
|
||||||
|
is_broken: true,
|
||||||
|
updated: true
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue