const assert = require('node:assert/strict'); const fs = require('node:fs'); const path = require('node:path'); const test = require('node:test'); const PageAvailability = require('../public/js/pending-pages.js'); const root = path.resolve(__dirname, '..'); const familyPendingPages = [ 'profile-invite.html', ]; const contentPendingPages = [ 'profile-data-reminders.html' ]; const pendingPages = familyPendingPages.concat(contentPendingPages); function read(relativePath) { return fs.readFileSync(path.join(root, relativePath), 'utf8'); } function createLink(attributes) { return { getAttribute(name) { return Object.prototype.hasOwnProperty.call(attributes, name) ? attributes[name] : null; } }; } test('待开发页面生成明确且转义后的状态提示', () => { assert.match(PageAvailability.buildBanner('家谱基础服务正在开发中'), /家谱基础服务正在开发中/); assert.match(PageAvailability.buildBanner('