Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mvadari committed Dec 2, 2024
1 parent 2c64b42 commit 95853b3
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/containers/shared/test/SocketContext.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('getSocket', () => {
const client = getSocket()
expect(XrplClient).toHaveBeenNthCalledWith(
1,
['wss://somewhere.com:51233', 'wss://somewhere.com:443'],
['wss://somewhere.com:51233'],
{
tryAllNodes: true,
},
Expand All @@ -47,12 +47,7 @@ describe('getSocket', () => {
const client = getSocket()
expect(XrplClient).toHaveBeenNthCalledWith(
1,
[
'wss://somewhere.com:51233',
'wss://somewhere.com:443',
'wss://elsewhere.com:51233',
'wss://elsewhere.com:443',
],
['wss://somewhere.com:51233', 'wss://elsewhere.com:51233'],
{
tryAllNodes: true,
},
Expand All @@ -71,7 +66,7 @@ describe('getSocket', () => {
const client = getSocket()
expect(XrplClient).toHaveBeenNthCalledWith(
1,
['ws://somewhere.com:51233', 'ws://somewhere.com:443'],
['ws://somewhere.com:51233'],
{
tryAllNodes: true,
},
Expand Down Expand Up @@ -120,13 +115,9 @@ describe('getSocket', () => {

it('should use ws when supplied entry is for a localhost', () => {
const client = getSocket('localhost')
expect(XrplClient).toHaveBeenNthCalledWith(
1,
['ws://localhost:51233', 'ws://localhost:443'],
{
tryAllNodes: true,
},
)
expect(XrplClient).toHaveBeenNthCalledWith(1, ['ws://localhost:51233'], {
tryAllNodes: true,
})

expect((client as any).p2pSocket).not.toBeDefined()
})
Expand Down

0 comments on commit 95853b3

Please sign in to comment.