mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
wip
This commit is contained in:
@@ -5,17 +5,15 @@ const { execSync } = require('child_process')
|
||||
beforeEach(() => {
|
||||
fs.rmdirSync('tests/__data__/output', { recursive: true })
|
||||
fs.mkdirSync('tests/__data__/output')
|
||||
fs.copyFileSync('tests/__data__/input/channels.db', 'tests/__data__/temp/channels.db')
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
fs.rmdirSync('tests/__data__/temp', { recursive: true })
|
||||
fs.mkdirSync('tests/__data__/temp')
|
||||
})
|
||||
|
||||
it('can create valid matrix', () => {
|
||||
const result = execSync('DB_DIR=tests/__data__/temp node scripts/commands/create-matrix.js', {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
const result = execSync(
|
||||
'DB_DIR=tests/__data__/input/database node scripts/commands/create-matrix.js',
|
||||
{
|
||||
encoding: 'utf8'
|
||||
}
|
||||
)
|
||||
|
||||
expect(result).toBe('::set-output name=matrix::{"cluster_id":[1]}\n')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user