Tools live under tools/<role>/<domain> (checks, generate, release, ci, dev), every tool is a workspace named @open-pencil/<domain>-tools, a shared tools/tsconfig.json backs the new check:tools gate that fixed 55 latent type errors, test:tools runs through bun --filter, the placement check is its own checks/test-homes package, and every tool resolves the repository through resolveWorkspaceRoot. Bun, Node, and mdast types live in a tools-root workspace so they never reach the app program.
16 lines
516 B
TypeScript
16 lines
516 B
TypeScript
import { expect, test } from 'bun:test'
|
|
import { readFile } from 'node:fs/promises'
|
|
import { join } from 'node:path'
|
|
|
|
import { resolveWorkspaceRoot } from '@open-pencil/package-artifacts-tools'
|
|
|
|
import { MENU_ARTIFACTS } from '../src/menu'
|
|
|
|
test('committed menus match the schema', async () => {
|
|
const root = await resolveWorkspaceRoot(import.meta.dir)
|
|
|
|
for (const [path, render] of Object.entries(MENU_ARTIFACTS)) {
|
|
expect(await readFile(join(root, path), 'utf8'), `${path} is stale`).toBe(render())
|
|
}
|
|
})
|