mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:10:45 +00:00
fix(release): keep legacy memory chunk stub
This commit is contained in:
@@ -4,6 +4,7 @@ import { describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
copyStaticExtensionAssets,
|
||||
listStaticExtensionAssetOutputs,
|
||||
writeLegacyCliExitCompatChunks,
|
||||
writeStableRootRuntimeAliases,
|
||||
} from "../../scripts/runtime-postbuild.mjs";
|
||||
import { createScriptTestHarness } from "./test-helpers.js";
|
||||
@@ -79,4 +80,14 @@ describe("runtime postbuild static assets", () => {
|
||||
);
|
||||
await expect(fs.stat(path.join(distDir, "library.js"))).rejects.toThrow();
|
||||
});
|
||||
|
||||
it("writes legacy CLI exit compatibility chunks", async () => {
|
||||
const rootDir = createTempDir("openclaw-runtime-postbuild-");
|
||||
|
||||
writeLegacyCliExitCompatChunks({ rootDir });
|
||||
|
||||
await expect(
|
||||
fs.readFile(path.join(rootDir, "dist", "memory-state-CcqRgDZU.js"), "utf8"),
|
||||
).resolves.toContain("function hasMemoryRuntime()");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user