Home > @opengovsg/testcontainers > getMappedPort
getMappedPort() function
Return the mapped host port for a container port. Throws if unmapped.
Signature:
typescript
getMappedPort: (container: ContainerInformation, containerPort: number) => numberParameters
| Parameter | Type | Description |
|---|---|---|
| container | ContainerInformation | |
| containerPort | number |
Returns:
number