diff --git a/src/shared/net/ip.test.ts b/src/shared/net/ip.test.ts index 2ed2558214a..8ff070383ae 100644 --- a/src/shared/net/ip.test.ts +++ b/src/shared/net/ip.test.ts @@ -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"); }