mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
test(dev): cover loopback dev origins
Add a focused config regression test that locks in localhost, 127.0.0.1, and the existing LAN dev origin allowlist.
This commit is contained in:
11
tests/unit/dev-origins-config.test.mjs
Normal file
11
tests/unit/dev-origins-config.test.mjs
Normal file
@@ -0,0 +1,11 @@
|
||||
import test from "node:test";
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user