docs: register Guanghu OS physical gestation protocols
This commit is contained in:
parent
5973c0e7fb
commit
70f0603e76
30 changed files with 679 additions and 50 deletions
|
|
@ -6,11 +6,15 @@ const {
|
|||
resolveSubjectId, search, searchAll,
|
||||
} = require("./server");
|
||||
|
||||
test("repository map has unique sequential codes and domestic primary routes", () => {
|
||||
test("repository map has unique registered codes, preserves REPO-013 gap, and uses domestic routes", () => {
|
||||
const map = loadMap();
|
||||
assert.equal(map.repositories.length, 12);
|
||||
assert.deepEqual(map.repositories.map(item => item.code), Array.from({ length: 12 }, (_, index) => `REPO-${String(index + 1).padStart(3, "0")}`));
|
||||
assert.equal(new Set(map.repositories.map(item => item.code)).size, 12);
|
||||
const expectedCodes = [
|
||||
...Array.from({ length: 12 }, (_, index) => `REPO-${String(index + 1).padStart(3, "0")}`),
|
||||
"REPO-014",
|
||||
];
|
||||
assert.deepEqual(map.repositories.map(item => item.code), expectedCodes);
|
||||
assert.equal(new Set(map.repositories.map(item => item.code)).size, expectedCodes.length);
|
||||
assert.ok(!map.repositories.some(item => item.code === "REPO-013"));
|
||||
for (const item of map.repositories) assert.match(item.primary.url, /^https:\/\/guanghulab\.com\/(?:fifth-domain|code)\//);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue