mirror of
https://github.com/iptv-org/iptv
synced 2025-12-18 11:27:34 -05:00
Update update.test.ts
This commit is contained in:
@@ -21,9 +21,12 @@ describe('playlist:update', () => {
|
|||||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||||
|
|
||||||
const files = glob
|
const files = glob.sync('tests/__data__/expected/playlist_update/*.m3u').map(filepath => {
|
||||||
.sync('tests/__data__/expected/playlist_update/*.m3u')
|
const fileUrl = pathToFileURL(filepath).toString()
|
||||||
.map(f => f.replace('tests/__data__/expected/playlist_update/', ''))
|
const pathToRemove = pathToFileURL('tests/__data__/expected/playlist_update/').toString()
|
||||||
|
|
||||||
|
return fileUrl.replace(pathToRemove, '')
|
||||||
|
})
|
||||||
|
|
||||||
files.forEach(filepath => {
|
files.forEach(filepath => {
|
||||||
expect(content(`tests/__data__/output/streams/${filepath}`), filepath).toBe(
|
expect(content(`tests/__data__/output/streams/${filepath}`), filepath).toBe(
|
||||||
|
|||||||
Reference in New Issue
Block a user