import test from 'node:test'; import assert from 'node:assert/strict'; import fs from 'node:fs'; import { fileURLToPath } from 'node:url'; import path from 'node:path'; const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..'); const read = (p) => fs.readFileSync(path.join(root, p), 'utf8'); test('Тестовая эпоха Arweave одинакова в UI, Server и Viewer', () => { const ui = read('shine-UI/js/services/protocol-tags.js'); const server = read('SHiNE-server/shine-server-blockchain/src/main/java/blockchain/ShineProtocolTags.java'); const viewer = read('shine-UI/static-sites/arweave-viewer/index.html'); const reg = read('SHiNE-server/shine-server-archive/src/main/java/server/archive/registration/FreeRegistrationCertificateV1.java'); assert.match(ui, /SHINE_PROTOCOL_NAMESPACE\s*=\s*'test5592'/); assert.match(server, /NAMESPACE\s*=\s*"test5592"/); assert.match(viewer, /SHINE_PROTOCOL_NAMESPACE\s*=\s*'test5592'/); assert.match(reg, /ShineProtocolTags\.APP_TAG_VALUE/); for (const txt of [ui, server, viewer, reg]) assert.doesNotMatch(txt, /test5591/); });