mirror of
https://github.com/iptv-org/iptv
synced 2025-12-20 12:27:27 -05:00
Update save-results.test.js
This commit is contained in:
@@ -3,21 +3,21 @@ const path = require('path')
|
|||||||
const { execSync } = require('child_process')
|
const { execSync } = require('child_process')
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fs.emptyDirSync('tests/__data__/temp')
|
fs.emptyDirSync('tests/__data__/output')
|
||||||
fs.copyFileSync(
|
fs.copyFileSync(
|
||||||
'tests/__data__/input/database/save-results.streams.db',
|
'tests/__data__/input/database/save-results.streams.db',
|
||||||
'tests/__data__/temp/streams.db'
|
'tests/__data__/output/streams.db'
|
||||||
)
|
)
|
||||||
|
|
||||||
const stdout = execSync(
|
const stdout = execSync(
|
||||||
'DB_DIR=tests/__data__/temp LOGS_DIR=tests/__data__/input/logs/load-cluster node scripts/commands/save-results.js',
|
'DB_DIR=tests/__data__/output LOGS_DIR=tests/__data__/input/logs/load-cluster node scripts/commands/save-results.js',
|
||||||
{ encoding: 'utf8' }
|
{ encoding: 'utf8' }
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can save results', () => {
|
it('can save results', () => {
|
||||||
expect(content('tests/__data__/temp/streams.db')).toEqual(
|
expect(content('tests/__data__/output/streams.db')).toEqual(
|
||||||
content('tests/__data__/expected/save-results.streams.db')
|
content('tests/__data__/expected/database/save-results.streams.db')
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user