Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ckousik committed Feb 3, 2023
1 parent 1fa8b0b commit 2336330
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface DaemonFactory {
spawn: (options: SpawnOptions) => Promise<Daemon>
}

export async function interopTests (factory: DaemonFactory) {
export async function interopTests (factory: DaemonFactory): Promise<void> {
connectTests(factory)
relayTests(factory)
await dhtTests(factory)
Expand Down
2 changes: 1 addition & 1 deletion src/pubsub/gossipsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() })
)
}
})
Expand Down
8 changes: 4 additions & 4 deletions src/relay/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import { echoHandler, reserve } from './util.js'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import defer from 'p-defer'

export function relayTests (factory: DaemonFactory) {
export function relayTests (factory: DaemonFactory): void {
const t: NodeType[] = ['go', 'js']
t.forEach(a => t.forEach(b => t.forEach(r => { if (!(a === b && a === r)) relayTest(factory, a, b, r) })))
t.forEach(a => { t.forEach(b => { t.forEach(r => { if (!(a === b && a === r)) relayTest(factory, a, b, r) }) }) })
}

function relayTest (factory: DaemonFactory, aType: NodeType, bType: NodeType, relayType: NodeType) {
function relayTest (factory: DaemonFactory, aType: NodeType, bType: NodeType, relayType: NodeType): void {
describe(`${aType} to ${bType} over relay ${relayType}`, () => {
let daemons: Daemon[] = []
const opts: SpawnOptions[] = [
Expand All @@ -28,7 +28,7 @@ function relayTest (factory: DaemonFactory, aType: NodeType, bType: NodeType, re
})

after(async function () {
await Promise.all(daemons.map(async d => await d.stop()))
await Promise.all(daemons.map(async d => { await d.stop() }))
})

it('connects', async () => {
Expand Down

0 comments on commit 2336330

Please sign in to comment.