Update create-matrix.test.js

This commit is contained in:
Aleksandr Statciuk 2022-02-07 08:41:52 +03:00
parent f56ea1e44e
commit 0de337039e
1 changed files with 3 additions and 3 deletions

View File

@ -3,13 +3,13 @@ const path = require('path')
const { execSync } = require('child_process')
beforeEach(() => {
fs.emptyDirSync('tests/__data__/temp')
fs.emptyDirSync('tests/__data__/output')
fs.copyFileSync('tests/__data__/input/database/streams.db', 'tests/__data__/temp/streams.db')
fs.copyFileSync('tests/__data__/input/database/streams.db', 'tests/__data__/output/streams.db')
})
it('can create valid matrix', () => {
const result = execSync('DB_DIR=tests/__data__/temp node scripts/commands/create-matrix.js', {
const result = execSync('DB_DIR=tests/__data__/output node scripts/commands/create-matrix.js', {
encoding: 'utf8'
})
expect(result).toBe('::set-output name=matrix::{"cluster_id":[1,3]}\n')