import test from 'node:test' import assert from 'node:assert/strict' import { readFile } from 'node:fs/promises' const root = new URL('../', import.meta.url) async function text(path) { return readFile(new URL(path, root), 'utf8') } test('dashboard primary surface is a device monitoring board, not an API catalog', async () => { const html = await text('public/index.html') const app = await text('public/app.js') assert.match(html, /设备监控|设备详情|实时状态/) assert.match(app, /renderDeviceDetails/) assert.match(app, /温度/) assert.match(app, /流量|速率/) assert.match(app, /内存|磁盘/) assert.match(app, /SIM|ICCID/) assert.match(app, /短信/) const dashboardBlock = html.match(/
\s*