Skip to content

Commit e565283

Browse files
authored
Merge branch 'master' into chore/upgrade-noble-2.0.1
2 parents 23504fb + 92f86bc commit e565283

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

packages/client/test/net/peer/rlpxpeer.spec.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ import { Event } from '../../../src/types.ts'
77
describe('[RlpxPeer]', async () => {
88
vi.mock('@ethereumjs/devp2p', async () => {
99
const devp2p = await vi.importActual<any>('@ethereumjs/devp2p')
10-
const RLPx = vi.fn().mockImplementation(() => {
11-
return {
12-
events: new EventEmitter(),
13-
connect: vi.fn(),
10+
11+
// Create a proper constructor mock for RLPx
12+
class RLPxMock {
13+
events = new EventEmitter()
14+
connect = vi.fn()
15+
constructor() {
16+
// Constructor can be empty, properties are initialized above
1417
}
15-
})
18+
}
1619

1720
return {
1821
...devp2p,
19-
RLPx,
22+
RLPx: RLPxMock,
2023
}
2124
})
2225

0 commit comments

Comments
 (0)