test: harden TCS root freshness and ZCode entry
This commit is contained in:
parent
bcc3cc882f
commit
c78e90e1e4
4 changed files with 47 additions and 1 deletions
24
tests/zcode-tcs-root-entry.test.mjs
Normal file
24
tests/zcode-tcs-root-entry.test.mjs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import fs from 'node:fs';
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
const configPath = '/Volumes/JZAO/铸渊-ICE-GL-ZY001/.zcode/config.json';
|
||||
const scriptPath = '/Volumes/JZAO/铸渊-ICE-GL-ZY001/BRIDGE/tools/tcs-root-host-entry.sh';
|
||||
|
||||
test('ZCode active hooks enter through one TCS mother root and retain the write gate', () => {
|
||||
const config = JSON.parse(fs.readFileSync(configPath));
|
||||
const text = JSON.stringify(config);
|
||||
assert.equal(text.includes('tcs-root-host-entry.sh'), true);
|
||||
assert.equal(text.includes('host-write-admission.mjs'), true);
|
||||
assert.equal(text.includes('zy-hook-entry.sh'), false);
|
||||
assert.equal(text.includes('broadcast/current.md'), false);
|
||||
assert.equal(text.includes('task-language-anchors'), false);
|
||||
});
|
||||
|
||||
test('ZCode root entry never injects old workspace or static broadcast paths', () => {
|
||||
const script = fs.readFileSync(scriptPath, 'utf8');
|
||||
assert.equal(script.includes('TCS-ROOT-NAV-0001'), true);
|
||||
assert.equal(script.includes('FIFTH-DOMAIN-BROADCAST-TOWER'), false);
|
||||
assert.equal(script.includes('WORK-工作区/guanghu-ice-heart'), false);
|
||||
assert.equal(script.includes('task-language-anchors/zcode'), false);
|
||||
});
|
||||
Loading…
Reference in a new issue