mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
wip
This commit is contained in:
parent
299cf26cd6
commit
ce525ed13c
13 changed files with 199 additions and 207 deletions
|
@ -5,20 +5,22 @@ const { execSync } = require('child_process')
|
|||
beforeEach(() => {
|
||||
fs.rmdirSync('tests/__data__/output', { recursive: true })
|
||||
fs.mkdirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
it('can load cluster', () => {
|
||||
const result = execSync(
|
||||
execSync(
|
||||
'DB_DIR=tests/__data__/input/database LOGS_DIR=tests/__data__/output/logs node scripts/commands/load-cluster.js --cluster-id=1',
|
||||
{ encoding: 'utf8' }
|
||||
)
|
||||
const logs = fs.readFileSync(
|
||||
})
|
||||
|
||||
it('can load cluster', () => {
|
||||
const output = fs.readFileSync(
|
||||
path.resolve('tests/__data__/output/logs/load-cluster/cluster_1.log'),
|
||||
{
|
||||
encoding: 'utf8'
|
||||
}
|
||||
)
|
||||
const lines = logs.split('\n')
|
||||
const lines = output.split('\n')
|
||||
const parsed = JSON.parse(lines[0])
|
||||
|
||||
expect(parsed._id).toBe('K1kaxwsWVjsRIZL6')
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue