test: narrow shared ip fixtures to IPv4

This commit is contained in:
Val Alexander
2026-03-13 16:37:04 -05:00
parent 814382002d
commit ee04b228df

View File

@@ -6,6 +6,7 @@ import {
isCanonicalDottedDecimalIPv4,
isCarrierGradeNatIpv4Address,
isIpInCidr,
isIpv4Address,
isIpv6Address,
isLegacyIpv4Literal,
isLoopbackIpAddress,
@@ -79,7 +80,7 @@ describe("shared ip helpers", () => {
expect(loopback?.kind()).toBe("ipv4");
expect(benchmark?.kind()).toBe("ipv4");
if (!loopback || loopback.kind() !== "ipv4" || !benchmark || benchmark.kind() !== "ipv4") {
if (!loopback || !isIpv4Address(loopback) || !benchmark || !isIpv4Address(benchmark)) {
throw new Error("expected ipv4 fixtures");
}