Update test.test.ts

This commit is contained in:
freearhey 2025-04-23 21:25:18 +03:00
parent 847fc7ba68
commit 51283c736e

View file

@ -1,5 +1,4 @@
import { execSync } from 'child_process'
import path from 'node:path'
import os from 'node:os'
type ExecError = {
@ -19,12 +18,8 @@ describe('playlist:test', () => {
execSync(cmd, { encoding: 'utf8' })
} catch (error) {
if (process.env.DEBUG === 'true') console.log(cmd, error)
expect((error as ExecError).stdout).toContain(slash('playlist_test/ag.m3u'))
expect((error as ExecError).stdout).toContain('playlist_test/ag.m3u')
expect((error as ExecError).stdout).toContain('2 problems (1 errors, 1 warnings)')
}
})
})
function slash(filepath: string) {
return filepath.split(path.sep).join(path.posix.sep)
}