test(config): tighten dev origins assertion

This commit is contained in:
Kfir Amar
2026-03-15 02:06:49 +02:00
parent 783d7ae605
commit 8ebe1cc2d8

View File

@@ -4,8 +4,5 @@ import assert from "node:assert/strict";
test("next config allows loopback dev origins alongside LAN access", async () => {
const { default: nextConfig } = await import("../../next.config.mjs");
assert.equal(Array.isArray(nextConfig.allowedDevOrigins), true);
assert.equal(nextConfig.allowedDevOrigins.includes("localhost"), true);
assert.equal(nextConfig.allowedDevOrigins.includes("127.0.0.1"), true);
assert.equal(nextConfig.allowedDevOrigins.includes("192.168.*"), true);
assert.deepEqual(nextConfig.allowedDevOrigins, ["localhost", "127.0.0.1", "192.168.*"]);
});