Update update.test.ts

This commit is contained in:
freearhey 2025-04-23 05:21:23 +03:00
parent 99e7831ee2
commit 387137c56d
1 changed files with 6 additions and 3 deletions

View File

@ -21,9 +21,12 @@ describe('playlist:update', () => {
const stdout = execSync(cmd, { encoding: 'utf8' })
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
const files = glob
.sync('tests/__data__/expected/playlist_update/*.m3u')
.map(f => f.replace('tests/__data__/expected/playlist_update/', ''))
const files = glob.sync('tests/__data__/expected/playlist_update/*.m3u').map(filepath => {
const fileUrl = pathToFileURL(filepath).toString()
const pathToRemove = pathToFileURL('tests/__data__/expected/playlist_update/').toString()
return fileUrl.replace(pathToRemove, '')
})
files.forEach(filepath => {
expect(content(`tests/__data__/output/streams/${filepath}`), filepath).toBe(