Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Try to re-fix tests

Chocobozzz1abf74e46428
diff --git a/packages/tests/src/shared/webtorrent.ts b/packages/tests/src/shared/webtorrent.ts
index c226fd2437..8f83ddf177 100644
--- a/packages/tests/src/shared/webtorrent.ts
+++ b/packages/tests/src/shared/webtorrent.ts
@@ -25,9 +25,7 @@ export async function parseTorrentVideo (server: PeerTubeServer, file: VideoFile
const data = await readFile(torrentPath)
- // FIXME: use classic import, on node 18.18 we have an error
- // "[ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in .../node_modules/parse-torrent/package.json"
- return require('parse-torrent')(data)
+ return (await import('parse-torrent')).default(data)
}
// ---------------------------------------------------------------------------