ReMe/reme_studio/tests/network-binding.test.mjs
jinliyl b9caae1e50
feat(service): support explicit wildcard network binds (#547)
* feat(service): bind network services to all interfaces

* fix(service): keep network listeners local by default

* fix(service): make remote access explicit
2026-09-15 14:26:33 +08:00

15 lines
594 B
JavaScript

import assert from "node:assert/strict";
import { readFile } from "node:fs/promises";
import test from "node:test";
test("Studio development servers require an explicit remote command", async () => {
const packageJson = JSON.parse(
await readFile(new URL("../package.json", import.meta.url), "utf8"),
);
const { scripts } = packageJson;
assert.doesNotMatch(scripts.dev, /0\.0\.0\.0/);
assert.doesNotMatch(scripts["dev:static"], /0\.0\.0\.0/);
assert.match(scripts["dev:remote"], /--hostname 0\.0\.0\.0/);
assert.match(scripts["dev:static:remote"], /--host 0\.0\.0\.0/);
});