源码快照 @ 2026-09-02 (source-only, 剔除非源码素材)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import path from "node:path";
|
||||
import { expect } from "vitest";
|
||||
import { test } from "@openwork/testkit";
|
||||
|
||||
import { buildHeadlessServerLaunch } from "../../scripts/dev-headless-web-lib";
|
||||
|
||||
test("headless web development launches the server from current source", ({ evidence }) => {
|
||||
const launch = buildHeadlessServerLaunch("/repo/openwork", ["--port", "8787"]);
|
||||
|
||||
expect(launch).toEqual({
|
||||
command: "bun",
|
||||
args: [
|
||||
"--conditions=development",
|
||||
path.join("/repo/openwork", "apps/server/src/cli.ts"),
|
||||
"--port",
|
||||
"8787",
|
||||
],
|
||||
});
|
||||
expect(launch.args.join(" ")).not.toContain("apps/server/dist");
|
||||
expect(launch.args.join(" ")).not.toContain("openwork-server");
|
||||
|
||||
evidence.recordAssertionEvidence(
|
||||
"Local headless development is source-first",
|
||||
"The launch command executes apps/server/src/cli.ts and never references compiled server output, so a stale dist binary cannot affect a restarted development stack.",
|
||||
true,
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user