From 38a871c9b68a0194c3b3123801e6904770c7ecda Mon Sep 17 00:00:00 2001 From: Andrei Regiani Date: Wed, 9 Oct 2024 14:59:59 -0300 Subject: [PATCH] Remove `options.debug` tests --- test/swarm.js | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/test/swarm.js b/test/swarm.js index c548497..662e8c8 100644 --- a/test/swarm.js +++ b/test/swarm.js @@ -418,57 +418,6 @@ test('one server, one client - correct deduplication when a client connection is swarm2.join(topic, { server: false, client: true }) }) -test('constructor options - debug options forwarded to DHT constructor', async (t) => { - const { bootstrap } = await createTestnet(3, t.teardown) - - const swarm1 = new Hyperswarm({ - bootstrap, - backoffs: BACKOFFS, - jitter: 0, - debug: { - handshake: { - latency: [500, 500] - } - } - }) - const swarm2 = new Hyperswarm({ - bootstrap, - backoffs: BACKOFFS, - jitter: 0, - debug: { - handshake: { - latency: [500, 500] - } - } - }) - - const connected = t.test('connection') - connected.plan(2) - - swarm1.once('connection', (conn) => { - connected.pass('swarm1') - conn.on('error', noop) - }) - swarm2.once('connection', (conn) => { - connected.pass('swarm2') - conn.on('error', noop) - }) - - const topic = Buffer.alloc(32).fill('hello world') - await swarm1.join(topic, { server: true }).flushed() - - const start = Date.now() - swarm2.join(topic, { client: true }) - - await connected - - const duration = Date.now() - start - t.ok(duration > 500) - - await swarm1.destroy() - await swarm2.destroy() -}) - test('flush when max connections reached', async (t) => { const { bootstrap } = await createTestnet(3, t.teardown)