chore(machine): set up vitest for apps/machine

First test surface for the Electron + Vue 3 app — apps/machine has had
no tests until now (workspace packages cover state-machine, nostr-client,
clink, lnbits). Cassette config #56 shipped untested under the same
posture; #57 (operator fee config consumer) introduces enough load-
bearing parser + state-store logic to want unit coverage, so growing
the test substrate now.

Adds `test` / `test:watch` scripts + vitest devDep + minimal config
that picks up `src/**/*.test.ts` and `electron/**/*.test.ts`. No tests
land here — that comes with the feature commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-06-01 10:53:15 +02:00
commit 6ea87c8a08
3 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,15 @@
import { defineConfig } from 'vitest/config'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
test: {
include: ['src/**/*.test.ts', 'electron/**/*.test.ts'],
globals: false,
environment: 'node',
},
})