Merge branch 'unstable' into ai/performance-events-cache-dirty-tracking-5412442767823742174

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-02-01 12:00:52 -05:00
commit 1fc9859798
6 files changed
+100 -11

No files matched your search

+10 -1
View File
@@ -20,6 +20,11 @@ class MockWebTorrent extends EventEmitter {
setTimeout(() => {
if (typeof cb === 'function') cb(torrent);
this.emit('torrent', torrent);
// Simulate webseed connection if urlList is present
if (opts && Array.isArray(opts.urlList) && opts.urlList.length > 0) {
torrent.emit('wire', { type: 'webSeed' });
}
}, 10);
return torrent;
@@ -75,10 +80,14 @@ describe("WebTorrent Regression Tests", () => {
const webSeedUrl = "http://localhost:8080/video.mp4";
const result = await client.probePeers(magnet, {
timeoutMs: 50, // Short timeout
timeoutMs: 1000, // Significantly increased timeout for CI robustness
urlList: [webSeedUrl]
});
if (!result.webseedOnly) {
console.log("Failed result:", result);
}
assert.strictEqual(result.webseedOnly, true, "Should detect webseed only scenario");
assert.strictEqual(result.healthy, true, "Should be healthy due to webseed");
assert.strictEqual(result.reason, "webseed", "Reason should be 'webseed'");