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.
19 lines
794 B
TypeScript
19 lines
794 B
TypeScript
import { describe, expect, test } from 'bun:test'
|
|
|
|
import { checkCommand, smokeCommand, verifyCommand } from '#package-quality/commands'
|
|
import { renderUsage, type ArgsDef, type CommandDef } from 'citty'
|
|
|
|
async function metaName<T extends ArgsDef>(command: CommandDef<T>): Promise<string | undefined> {
|
|
const meta = await (typeof command.meta === 'function' ? command.meta() : command.meta)
|
|
return meta?.name
|
|
}
|
|
|
|
describe('package quality commands', () => {
|
|
test('exposes stable check, smoke, and verify workflows', async () => {
|
|
expect(await metaName(checkCommand)).toBe('check')
|
|
expect(await metaName(smokeCommand)).toBe('smoke')
|
|
expect(await metaName(verifyCommand)).toBe('verify')
|
|
expect(await renderUsage(verifyCommand)).toContain('built-package smoke tests')
|
|
})
|
|
})
|