Skip to content

Commit 1459f1d

Browse files
committed
fix: update interop tests for non-generic HeliaLibp2p type
1 parent 7eb3ea2 commit 1459f1d

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

packages/interop/test/fixtures/create-helia.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import { ping } from '@libp2p/ping'
44
import { createHelia as createNode } from 'helia'
55
import { ipnsSelector } from 'ipns/selector'
66
import { ipnsValidator } from 'ipns/validator'
7-
import type { Libp2p } from '@libp2p/interface'
8-
import type { KadDHT } from '@libp2p/kad-dht'
97
import type { HeliaInit, HeliaLibp2p } from 'helia'
108

11-
export async function createHelia (init?: Partial<HeliaInit>): Promise<HeliaLibp2p<Libp2p<{ dht: KadDHT }>>> {
9+
export async function createHelia (init?: Partial<HeliaInit>): Promise<HeliaLibp2p> {
1210
const helia = await createNode({
1311
libp2p: {
1412
peerDiscovery: [],
@@ -30,6 +28,5 @@ export async function createHelia (init?: Partial<HeliaInit>): Promise<HeliaLibp
3028
}
3129
})
3230

33-
// @ts-expect-error cannot derive service map type
3431
return helia
3532
}

packages/interop/test/index.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ import * as raw from 'multiformats/codecs/raw'
1313
import { sha256 } from 'multiformats/hashes/sha2'
1414
import { createHelia } from './fixtures/create-helia.js'
1515
import type { DelegatedRoutingV1HttpApiClient } from '@helia/delegated-routing-v1-http-api-client'
16-
import type { Libp2p } from '@libp2p/interface'
17-
import type { KadDHT } from '@libp2p/kad-dht'
1816
import type { FastifyInstance } from 'fastify'
1917
import type { HeliaLibp2p } from 'helia'
2018

2119
describe('delegated-routing-v1-http-api interop', () => {
22-
let network: Array<HeliaLibp2p<Libp2p<{ dht: KadDHT }>>>
20+
let network: Array<HeliaLibp2p>
2321
let server: FastifyInstance
2422
let client: DelegatedRoutingV1HttpApiClient
2523

0 commit comments

Comments
 (0)