From c38ab0f070fb97f7bc7505fca9d2fe9378e7351e Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Wed, 23 Apr 2025 05:21:23 +0300 Subject: [PATCH] Update update.test.ts --- tests/commands/playlist/update.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/commands/playlist/update.test.ts b/tests/commands/playlist/update.test.ts index a9949c4994..a430b8df45 100644 --- a/tests/commands/playlist/update.test.ts +++ b/tests/commands/playlist/update.test.ts @@ -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(