Build complete AI creator partnership prototype

This commit is contained in:
Codex Sites
2026-07-18 22:55:00 -05:00
commit 8cdc0bf20f
54 changed files with 12460 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import assert from "node:assert/strict";
import test from "node:test";
const developmentPreviewMeta =
/<meta(?=[^>]*\bname=["']codex-preview["'])(?=[^>]*\bcontent=["']development["'])[^>]*>/i;
test("renders development preview metadata", async () => {
const workerUrl = new URL("../dist/server/index.js", import.meta.url);
workerUrl.searchParams.set("test", `${process.pid}-${Date.now()}`);
const { default: worker } = await import(workerUrl.href);
const response = await worker.fetch(
new Request("http://localhost/", {
headers: { accept: "text/html" },
}),
{
ASSETS: {
fetch: async () => new Response("Not found", { status: 404 }),
},
},
{
waitUntil() {},
passThroughOnException() {},
},
);
assert.equal(response.status, 200);
assert.match(
response.headers.get("content-type") ?? "",
/^text\/html\b/i,
);
assert.match(await response.text(), developmentPreviewMeta);
});