hololake-system-architecture/product-source/hololake-native-desktop/scripts/fifth-domain-private-route.test.mjs

32 lines
1.4 KiB
JavaScript

import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const source = fs.readFileSync(new URL('../src/main.tsx', import.meta.url), 'utf8')
test('Zhizhi remains absent from the public Fifth Domain card', () => {
const publicCard = source.slice(source.indexOf("domain: 'FIFTH_DOMAIN'"), source.indexOf('const starPoints'))
assert.doesNotMatch(publicCard, /之之|ICE-GL-ZHI/)
})
test('the verified Zhizhi route unfolds through her exact private nesting', () => {
assert.match(source, /ICE-GL-ZHI∞/)
assert.match(source, /永恒湖心系统/)
assert.match(source, /爱之核心子系统/)
assert.match(source, /明天见频道/)
assert.match(source, /光湖奶瓶小宝宝系统/)
assert.match(source, /ICE-BB-\* · AGE/)
})
test('the Eternal Lake Heart system body exposes both owned branches before channel tools', () => {
assert.match(source, /title="心跳核心频道" meta="冰朔 · 私人频道"/)
assert.match(source, /title="爱之核心子系统" meta="责任主体 · 之之"/)
assert.match(source, /worldStage === 'heartbeat'/)
assert.match(source, /<h1>心跳核心频道<\/h1>/)
})
test('Fifth Domain human numbers are paired with their own login account', () => {
assert.match(source, /'ICE-GL∞': 'bingshuo'/)
assert.match(source, /'ICE-GL-ZHI∞': 'zhizhi'/)
assert.match(source, /HOLOLAKE_LOGIN_ACCOUNT_NUMBER_MISMATCH/)
})