mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-17 01:56:16 -08:00
docs(site): [SITE-01] inventory sources and reconcile demo coverage
This commit is contained in:
1 parent
d62ab13a35
commit
d74ecc43cc
21 files changed
+22389
-56
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import assert from 'node:assert/strict'
|
||||
// eslint-disable-next-line test/no-import-node-test -- Runs with the repository baseline node:test suite.
|
||||
import test from 'node:test'
|
||||
import { captureSiteInventory, validateSiteInventory } from './site-inventory.mjs'
|
||||
|
||||
test('Site inventory detects omitted HTML, declarations and fingerprint drift', () => {
|
||||
const snapshot = captureSiteInventory()
|
||||
validateSiteInventory(snapshot)
|
||||
for (const mutate of [
|
||||
value => value.pages = value.pages.filter(page => page.source !== 'docs/mobile.html'),
|
||||
value => value.editorDeclarations.pop(),
|
||||
value => value.assets[0].sha256 = 'changed',
|
||||
value => value.api.pop(),
|
||||
]) {
|
||||
const changed = structuredClone(snapshot)
|
||||
mutate(changed)
|
||||
assert.throws(() => validateSiteInventory(changed))
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user