feat: move bucket modules to top-level lists (#116)

This commit is contained in:
cxymds
2026-05-13 10:19:38 +08:00
committed by GitHub
parent c041d55286
commit bb3e36663f
13 changed files with 393 additions and 629 deletions
+15
View File
@@ -0,0 +1,15 @@
import test from "node:test"
import assert from "node:assert/strict"
import { buildModuleBucketPath } from "../../lib/module-bucket-route.js"
test("buildModuleBucketPath links a bucket to a module detail route", () => {
assert.equal(buildModuleBucketPath("/lifecycle", "photos"), "/lifecycle?bucket=photos")
})
test("buildModuleBucketPath encodes bucket names in query params", () => {
assert.equal(buildModuleBucketPath("/events", "logs archive"), "/events?bucket=logs+archive")
})
test("buildModuleBucketPath returns module root when bucket is empty", () => {
assert.equal(buildModuleBucketPath("/replication", ""), "/replication")
})