Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
JavaScript
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960import assert from "node:assert/strict";import test from "node:test";
import basic from "../screenplays/basic-tutorial.mjs";import imageGeneration from "../screenplays/image-generation-workflow.mjs";import imageNode from "../screenplays/image-node-tutorial.mjs";import editorSettings from "../screenplays/editor-settings-tour.mjs";import appsQuickstart from "../screenplays/apps-quickstart.mjs";
const LOCALES = ["en", "es", "fr"];
for (const screenplay of [basic, imageNode]) { test(`${screenplay.slug} has complete English, Spanish, and French narration`, () => { assert.ok(screenplay.beats.length >= 7); for (const beat of screenplay.beats) { for (const locale of LOCALES) { assert.equal(typeof beat.say[locale], "string"); assert.ok(beat.say[locale].length > 12); } } });}
test("editor-settings tour is English-first, non-billable, and evidence-gated", () => { assert.equal(editorSettings.billable, false); assert.ok(editorSettings.beats.length >= 8); assert.ok(editorSettings.acceptance.requiredChecks.includes("selection_mode_visible")); assert.ok(editorSettings.acceptance.requiredChecks.includes("settings_returned_to_canvas")); assert.match(editorSettings.beats.map((beat) => beat.say).join(" "), /connecting, disconnecting/i);});
test("image-generation-workflow has complete English and Chinese narration", () => { assert.equal(imageGeneration.billable, true); assert.equal(imageGeneration.effectTheme.color, "#111111"); assert.equal(imageGeneration.effectTheme.glowColor, "#ffffff"); assert.equal(imageGeneration.effectTheme.scrollIntoView, false); assert.doesNotMatch(JSON.stringify(imageGeneration.effectTheme), /7c3aed|purple/i); assert.ok(imageGeneration.beats.length >= 8); for (const beat of imageGeneration.beats) { for (const locale of ["en", "zh-CN"]) { assert.equal(typeof beat.say[locale], "string"); assert.ok(beat.say[locale].length > 12); } } assert.match(imageGeneration.beats.map((beat) => beat.say.en).join(" "), /image-to-image generation/i); assert.match(imageGeneration.beats.map((beat) => beat.say["zh-CN"]).join(" "), /图生图/);});
test("apps quickstart gives every chapter a distinct compact color identity", () => { assert.equal(appsQuickstart.shortTitle, "First app"); assert.equal(new Set(appsQuickstart.chapters.map((chapter) => chapter.color)).size, appsQuickstart.chapters.length); assert.equal(new Set(appsQuickstart.chapters.map((chapter) => chapter.wallpaperColor)).size, appsQuickstart.chapters.length); for (const chapter of appsQuickstart.chapters) { assert.ok(chapter.shortTitle.length <= 12); assert.notEqual(chapter.color, chapter.wallpaperColor); }});