From 95e5d463957d0165209aa5bac2bb5f2f140d7642 Mon Sep 17 00:00:00 2001 From: Chinmay Kousik Date: Fri, 3 Feb 2023 10:06:23 +0530 Subject: [PATCH] fix lint reverts await --- src/pubsub/gossipsub.ts | 2 +- src/relay/index.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pubsub/gossipsub.ts b/src/pubsub/gossipsub.ts index 6c4c3d8..b2a7968 100644 --- a/src/pubsub/gossipsub.ts +++ b/src/pubsub/gossipsub.ts @@ -42,7 +42,7 @@ function runGossipsubTests (factory: DaemonFactory, optionsA: SpawnOptions, opti after(async function () { if (daemons != null) { await Promise.all( - daemons.map(async (daemon) => await daemon.stop()) + daemons.map(async daemon => await daemon.stop()) ) } }) diff --git a/src/relay/index.ts b/src/relay/index.ts index 2423768..7689db3 100644 --- a/src/relay/index.ts +++ b/src/relay/index.ts @@ -24,17 +24,17 @@ function relayTest (factory: DaemonFactory, aType: NodeType, bType: NodeType, re before(async function () { this.timeout(20 * 1000) - daemons = await Promise.all(opts.map( o => factory.spawn(o))) + daemons = await Promise.all(opts.map(async o => await factory.spawn(o))) }) after(async function () { - await Promise.all(daemons.map(d => d.stop())) + await Promise.all(daemons.map(async d => await d.stop())) }) it('connects', async () => { const aNode = daemons[0] const bNode = daemons[1] - const identify = await Promise.all(daemons.map(d => d.client.identify())) + const identify = await Promise.all(daemons.map(async d => await d.client.identify())) const bId = identify[1] const relayId = identify[2]