@@ -75,16 +75,14 @@ describe("readHermesApiPort", () => {
7575 expect ( readHermesApiPort ( { } ) ) . toBe ( 8642 ) ;
7676 } ) ;
7777
78- it . each ( [
79- "8641" ,
80- "8653" ,
81- "9000" ,
82- "²" ,
83- ] ) ( "rejects %s outside the allocated Hermes API-port range" , ( value ) => {
84- expect ( ( ) => readHermesApiPort ( { [ HERMES_API_PORT_ENV ] : value } ) ) . toThrow (
85- / i n t e g e r f r o m 8 6 4 2 t h r o u g h 8 6 5 2 / ,
86- ) ;
87- } ) ;
78+ it . each ( [ "8641" , "8653" , "9000" , "²" ] ) (
79+ "rejects %s outside the allocated Hermes API-port range" ,
80+ ( value ) => {
81+ expect ( ( ) => readHermesApiPort ( { [ HERMES_API_PORT_ENV ] : value } ) ) . toThrow (
82+ / i n t e g e r f r o m 8 6 4 2 t h r o u g h 8 6 5 2 / ,
83+ ) ;
84+ } ,
85+ ) ;
8886} ) ;
8987
9088describe ( "findAvailableHermesApiPort" , ( ) => {
@@ -185,9 +183,11 @@ describe("reserveCreateSandboxHermesApiPort", () => {
185183 } ) ;
186184
187185 it ( "reports EADDRINUSE for a durable sandbox without a port instead of allocating (#9291)" , async ( ) => {
188- const reservePort = vi . fn ( ) . mockRejectedValueOnce (
189- Object . assign ( new Error ( "port 8642 is already held" ) , { code : "EADDRINUSE" } ) ,
190- ) ;
186+ const reservePort = vi
187+ . fn ( )
188+ . mockRejectedValueOnce (
189+ Object . assign ( new Error ( "port 8642 is already held" ) , { code : "EADDRINUSE" } ) ,
190+ ) ;
191191 const env : NodeJS . ProcessEnv = { } ;
192192
193193 await expect (
@@ -207,9 +207,11 @@ describe("reserveCreateSandboxHermesApiPort", () => {
207207 } ) ;
208208
209209 it ( "reports EADDRINUSE for a created sandbox that still has pendingRouteReservation (#9291)" , async ( ) => {
210- const reservePort = vi . fn ( ) . mockRejectedValueOnce (
211- Object . assign ( new Error ( "port 8642 is already held" ) , { code : "EADDRINUSE" } ) ,
212- ) ;
210+ const reservePort = vi
211+ . fn ( )
212+ . mockRejectedValueOnce (
213+ Object . assign ( new Error ( "port 8642 is already held" ) , { code : "EADDRINUSE" } ) ,
214+ ) ;
213215 const env : NodeJS . ProcessEnv = { } ;
214216
215217 await expect (
@@ -430,9 +432,13 @@ describe("resolveVerifyAgentApiPort (#9290)", () => {
430432
431433 it ( "keeps a non-Hermes agent's declared probe port" , ( ) => {
432434 expect (
433- resolveVerifyAgentApiPort ( "sb" , { name : "other" , healthProbe : { port : 9000 } } , {
434- getSandbox : ( ) => ( { hermesApiPort : 8643 } ) ,
435- } ) ,
435+ resolveVerifyAgentApiPort (
436+ "sb" ,
437+ { name : "other" , healthProbe : { port : 9000 } } ,
438+ {
439+ getSandbox : ( ) => ( { hermesApiPort : 8643 } ) ,
440+ } ,
441+ ) ,
436442 ) . toBe ( 9000 ) ;
437443 } ) ;
438444
0 commit comments