vicky469_aside/tests/publishPath.test.ts
vicky469 e94254ee2d feat(publish): add local Pages publishing
Add experimental Cloudflare Pages publishing through local Wrangler, pane-header publish actions, public HTML preview support, artifact safety checks, and state cleanup for rename/delete/unpublish flows.
2026-07-09 15:51:02 +08:00

17 lines
551 B
TypeScript

import * as assert from "node:assert/strict";
import test from "node:test";
import {
buildPublishPublicUrl,
} from "../src/core/publish/publishPath";
const exampleRelativePath = "share/BESS Fire and Toxic Gas Safety Spec.zh.html";
test("buildPublishPublicUrl preserves path segments and encodes spaces", () => {
assert.equal(
buildPublishPublicUrl({
baseUrl: "https://publish.example.com",
vaultRelativePath: exampleRelativePath,
}),
"https://publish.example.com/share/BESS%20Fire%20and%20Toxic%20Gas%20Safety%20Spec.zh.html",
);
});