Skip to content

Commit

Permalink
chore: simplify relay test
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Nov 8, 2024
1 parent 9258580 commit d53fecc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/transport-circuit-relay-v2/test/hop.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import { generateKeyPair } from '@libp2p/crypto/keys'
import { TypedEventEmitter, isStartable } from '@libp2p/interface'
import { matchPeerId } from '@libp2p/interface-compliance-tests/matchers'
import { mockRegistrar, mockUpgrader, mockNetwork, mockConnectionManager, mockConnectionGater } from '@libp2p/interface-compliance-tests/mocks'
import { mockRegistrar, mockUpgrader, mockNetwork, mockConnectionManager } from '@libp2p/interface-compliance-tests/mocks'
import { defaultLogger } from '@libp2p/logger'
import { PeerMap } from '@libp2p/peer-collections'
import { peerIdFromPrivateKey } from '@libp2p/peer-id'
Expand Down Expand Up @@ -81,7 +80,7 @@ describe('circuit-relay hop protocol', function () {
events
})

const connectionGater = mockConnectionGater()
const connectionGater = {}

const service = circuitRelayServer(circuitRelayInit)({
addressManager,
Expand Down Expand Up @@ -291,7 +290,7 @@ describe('circuit-relay hop protocol', function () {
expect(response).to.have.property('type', HopMessage.Type.STATUS)
expect(response).to.have.property('status', Status.OK)

expect(relayNode.peerStore.merge.calledWith(matchPeerId(clientNode.peerId), {
expect(relayNode.peerStore.merge.calledWith(clientNode.peerId, {
tags: {
[RELAY_SOURCE_TAG]: {
value: 1,
Expand Down

0 comments on commit d53fecc

Please sign in to comment.