Files
epg/tests/commands/create-matrix.test.js

20 lines
488 B
JavaScript
Raw Normal View History

2022-01-06 17:26:41 +03:00
const fs = require('fs')
const path = require('path')
const { execSync } = require('child_process')
beforeEach(() => {
2022-01-09 19:07:14 +03:00
fs.rmdirSync('tests/__data__/output', { recursive: true })
fs.mkdirSync('tests/__data__/output')
2022-01-06 17:26:41 +03:00
})
it('can create valid matrix', () => {
2022-01-10 00:34:05 +03:00
const result = execSync(
'DB_DIR=tests/__data__/input/database node scripts/commands/create-matrix.js',
{
encoding: 'utf8'
}
)
2022-01-06 17:26:41 +03:00
expect(result).toBe('::set-output name=matrix::{"cluster_id":[1]}\n')
})