Update generate-playlists.test.js

This commit is contained in:
Aleksandr Statciuk 2022-02-07 08:42:35 +03:00
parent 1869be4014
commit 8ab456c16e
1 changed files with 2 additions and 3 deletions

View File

@ -5,14 +5,13 @@ const { execSync } = require('child_process')
beforeEach(() => { beforeEach(() => {
fs.emptyDirSync('tests/__data__/output') fs.emptyDirSync('tests/__data__/output')
fs.emptyDirSync('tests/__data__/temp')
fs.copyFileSync( fs.copyFileSync(
'tests/__data__/input/database/generate-playlists.streams.db', 'tests/__data__/input/database/generate-playlists.streams.db',
'tests/__data__/temp/streams.db' 'tests/__data__/output/streams.db'
) )
const stdout = execSync( const stdout = execSync(
'DB_DIR=tests/__data__/temp DATA_DIR=tests/__data__/input/data PUBLIC_DIR=tests/__data__/output/.gh-pages LOGS_DIR=tests/__data__/output/logs/generators node --trace-warnings scripts/commands/generate-playlists.js', 'DB_DIR=tests/__data__/output DATA_DIR=tests/__data__/input/data PUBLIC_DIR=tests/__data__/output/.gh-pages LOGS_DIR=tests/__data__/output/logs/generators node --trace-warnings scripts/commands/generate-playlists.js',
{ encoding: 'utf8' } { encoding: 'utf8' }
) )
}) })