← Back to GUI Docs


Tests

this.gui has three test suites. Two run automatically on every build; one requires a compiled dist.


Run all

npm run test:runtime

Runs markdown-document-core + monad-discovery-core in sequence. This is also the prebuild hook — it runs before every npm run build.


Suites

markdown-document-core.test.ts

What it tests: The markdown → GUI node pipeline.

Parses a markdown document with headings, paragraphs, inline code, links, fenced code blocks, bullet lists, and tables — and asserts the output tree matches the expected GUI node structure. Also tests resolveMarkdownUrl for relative and absolute URL resolution.

How to run:

npx tsx tests/markdown-document-core.test.ts

Expected output:

markdown-document-core ok

monad-discovery-core.test.ts

What it tests: The monad discovery and topology scan system.

How to run:

npx tsx tests/monad-discovery-core.test.ts

Expected output:

monad-discovery-core ok

consume-test.mjs

What it tests: That the compiled dist bundle exports correctly and can be consumed as a package.

Requires: A compiled dist — run npm run build first.

How to run:

npm run build
node tests/consume-test.mjs

Expected output:

✓ Test 1: Core bundle exports
✓ Test 2: Consumption without react-router-dom
✓ Test 3: Consumption of router subpath

Coverage

Suite Covers
markdown-document-core Markdown parser, node tree output, URL resolution
monad-discovery-core Endpoint normalization, topology scan, merge logic, reactive store
consume-test Bundle integrity, package consumption, subpath exports

← Back to GUI Docs