mirror of
https://github.com/vicky469/aside.git
synced 2026-07-22 17:42:04 +00:00
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.
17 lines
551 B
TypeScript
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",
|
|
);
|
|
});
|