File tree Expand file tree Collapse file tree
packages/devframe/src/rpc/transports Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ describe('ws auth token in URL', () => {
3939
4040describe ( 'devframe rpc' , ( ) => {
4141 it ( 'should work w/ ws transport' , async ( ) => {
42- const PORT = 3333
4342 // Use 127.0.0.1 on both client and server so they agree on the
4443 // address family — `localhost` resolution is ambiguous (IPv4 vs IPv6)
4544 // and differs between Windows/macOS/Linux, which causes the client
4645 // to hang when the two sides pick opposite families.
4746 const HOST = '127.0.0.1'
47+ const PORT = await getPort ( { random : true , host : HOST } )
4848 const WS_URL = `ws://${ HOST } :${ PORT } `
4949
5050 const serverFunctions = {
@@ -88,7 +88,7 @@ describe('devframe rpc', () => {
8888 // alongside the result path.
8989 it ( 'returns a rejection (not a serialization crash) when a jsonSerializable RPC throws' , async ( ) => {
9090 const HOST = '127.0.0.1'
91- const PORT = await getPort ( { port : 3334 , host : HOST } )
91+ const PORT = await getPort ( { random : true , host : HOST } )
9292 const WS_URL = `ws://${ HOST } :${ PORT } `
9393
9494 const serverFunctions = {
You can’t perform that action at this time.
0 commit comments