mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-03 21:35:13 +00:00
New standalone `app/` package (own package.json, like dash/) for the
CodeBurn Desktop Electron app. Adds the Vite 6 + React 19 + Vitest
toolchain, the verbatim wireframe CSS port (renderer/styles/indigo.css),
and the main-process `codeburn` CLI resolver + spawner:
- resolveCodeburnPath(): CODEBURN_BIN override → persisted-path file →
PATH/brew/nvm/volta/asdf → null (mirrors mac/CodeburnCLI.swift).
- spawnCli(args, {timeoutMs}): plain argv (no shell), collect stdout,
JSON.parse, structured CliError{kind: not-found|nonzero|bad-json|timeout}.
- cli.test.ts covers success / nonzero / bad-json / timeout / not-found.
9 lines
358 B
TypeScript
9 lines
358 B
TypeScript
import '@testing-library/jest-dom/vitest'
|
|
import { afterEach } from 'vitest'
|
|
|
|
// Only wire DOM cleanup in a browser-like (jsdom) environment; node-env tests
|
|
// (cli/main) have no document and must not import RTL's DOM cleanup.
|
|
if (typeof document !== 'undefined') {
|
|
const { cleanup } = await import('@testing-library/react')
|
|
afterEach(() => cleanup())
|
|
}
|