Update tests

This commit is contained in:
freearhey committed 2026-09-18 11:30:45 +03:00
1 parent d7f1cdf2c1
commit 9902121ac0
10 files changed
+49 -10

No files matched your search

+2 -4
View File
@@ -1,3 +1,4 @@
import { describe, beforeEach, it, expect } from 'vitest'
import { pathToFileURL } from 'node:url'
import { execSync } from 'child_process'
import * as fs from 'fs-extra'
@@ -12,7 +13,7 @@ beforeEach(() => {
})
describe('playlist:update', () => {
it('can update playlists', done => {
it('can update playlists', async () => {
let cmd = `${ENV_VAR} npm run playlist:update`
if (!process.env.DEBUG) cmd += ' --silent'
try {
@@ -39,11 +40,8 @@ describe('playlist:update', () => {
expect(content('tests/__data__/output/logs/playlist_update.log')).toBe(
content('tests/__data__/expected/playlist_update/playlist_update.log')
)
done()
} catch (err) {
if (process.env.DEBUG === 'true') console.log(cmd, err.stdout)
done(err)
}
})
})