import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import test from "node:test"; const projectLandingSource = readFileSync( new URL("../src/ProjectLanding.tsx", import.meta.url), "utf8", ); test("project creation keeps validated multi-label graph nodes", () => { assert.match(projectLandingSource, /const rawLabels = rawNode\.labels/); assert.match(projectLandingSource, /labels 必须包含主类型/); assert.match( projectLandingSource, /\.\.\.\(normalizedLabels \? \{ labels: normalizedLabels \} : \{\}\)/, ); });