Update update-database.test.js
This commit is contained in:
parent
385b087ac0
commit
cc7fd8387e
|
@ -5,7 +5,7 @@ const { execSync } = require('child_process')
|
|||
beforeEach(() => {
|
||||
fs.rmdirSync('tests/__data__/temp', { recursive: true })
|
||||
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', () => {
|
||||
|
@ -94,4 +94,16 @@ it('can update database', () => {
|
|||
updated: true,
|
||||
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…
Reference in New Issue