Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334import test from "node:test";import assert from "node:assert/strict";import { handler } from "../netlify/functions/index.mjs";
test("direct handle URLs return a DOM profile without booting the canvas", async () => { const response = await handler({ path: "/%40jeffrey", headers: { host: "aesthetic.computer" }, queryStringParameters: {}, }); assert.equal(response.statusCode, 200); assert.match(response.body, /<ac-profile handle="@jeffrey">/); assert.ok(!response.body.includes("bios.mjs") && !response.body.includes("boot.mjs"));});
test("favicon.ico redirects to the platform SVG", async () => { const response = await handler({ path: "/favicon.ico", headers: {}, queryStringParameters: {}, });
assert.equal(response.statusCode, 302); assert.equal(response.headers.Location, "/purple-pals.svg");});
test("missing requestProvider source map is a 404", async () => { const response = await handler({ path: "/requestProvider.js.map", headers: {}, queryStringParameters: {}, });
assert.equal(response.statusCode, 404);});