diff --git a/sdks/typescript/tests/helpers/docker.ts b/sdks/typescript/tests/helpers/docker.ts index 7c610ba..71837cc 100644 --- a/sdks/typescript/tests/helpers/docker.ts +++ b/sdks/typescript/tests/helpers/docker.ts @@ -154,7 +154,8 @@ export async function startDockerSandboxAgent( encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], }).trim(); - const hostPort = mapping.split(":").at(-1)?.trim(); + const mappingParts = mapping.split(":"); + const hostPort = mappingParts[mappingParts.length - 1]?.trim(); if (!hostPort) { throw new Error(`missing mapped host port in ${mapping}`); }