import assert from "node:assert/strict"; import { readFileSync } from "node:fs"; import test from "node:test"; const loginSource = readFileSync(new URL("../src/AdminLogin.tsx", import.meta.url), "utf8"); const brandSource = readFileSync(new URL("../src/Brand.tsx", import.meta.url), "utf8"); const indexSource = readFileSync(new URL("../index.html", import.meta.url), "utf8"); const logo = readFileSync( new URL("../public/assets/nianxx-wordmark-black-transparent.png", import.meta.url), ); test("the login page uses the nian.xx company logo and digital asset product name", () => { assert.match(loginSource, //); assert.match(loginSource, /智念数字资产管理系统/); assert.match(loginSource, /DIGITAL ASSET MANAGEMENT PLATFORM/); assert.doesNotMatch(loginSource, /智念城市知识图谱管理系统/); assert.match(brandSource, />xx\s*xxx\s*智念数字资产管理系统<\/title>/); assert.ok(logo.byteLength > 0); });