Skip to content

Commit cdd5ce0

Browse files
committed
fix(selfhost): guard the possibly-undefined service lookup in the resource-limits test
1 parent 011b06f commit cdd5ce0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/unit/selfhost-compose-resource-limits.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe("docker-compose.yml — per-service memory limits (#1828, #2495)", () =
3333
for (const [name, expected] of Object.entries(EXPECTED_LIMITS)) {
3434
const service = services[name];
3535
expect(service, name).toBeTruthy();
36-
const deploy = service.deploy as { resources?: { limits?: { memory?: unknown } } } | undefined;
36+
const deploy = service?.deploy as { resources?: { limits?: { memory?: unknown } } } | undefined;
3737
expect(deploy?.resources?.limits?.memory, name).toBe(expected);
3838
}
3939
});

0 commit comments

Comments
 (0)