codeburn/app/vitest.config.ts
iamtoruk 5736c95324 feat(app): scaffold Electron+Vite package and codeburn CLI spawn
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.
2026-07-10 15:16:55 -07:00

14 lines
459 B
TypeScript

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
// Default env is node (for electron/cli tests). Renderer component tests opt
// into jsdom with a `// @vitest-environment jsdom` docblock.
export default defineConfig({
plugins: [react()],
test: {
environment: 'node',
globals: false,
setupFiles: ['./renderer/test/setup.ts'],
include: ['renderer/**/*.test.{ts,tsx}', 'electron/**/*.test.ts'],
},
})