This commit is contained in:
Aleksandr Statciuk 2022-01-10 00:34:05 +03:00
parent 299cf26cd6
commit ce525ed13c
13 changed files with 199 additions and 207 deletions

View file

@ -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')
})