26cd7fc7b0
Extracts yt-dlp argv construction out of download.ts into its own
electron-free module (src/main/buildArgs.ts) so it can be exercised by
vitest without spinning up Electron, plus a real-download integration
test (skipped by default; opt in with AEROFETCH_REAL_DOWNLOAD=1) that
spawns the bundled yt-dlp.exe/ffmpeg.exe against its argv. download.ts
isn't wired up to it yet — that lands with the next commit.
This was done in an earlier local session but never actually committed,
even though download.ts has imported from it since the Phase A commit
(bb5dd6c) — the build had been relying on an uncommitted local file.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
493 B
TypeScript
18 lines
493 B
TypeScript
import { resolve } from 'path'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
// Stand-alone vitest config. The unit tests only exercise the pure arg-building
|
|
// logic in src/main/buildArgs.ts, which imports types/consts from @shared — so we
|
|
// just need that one alias mirrored from electron.vite.config.ts.
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@shared': resolve('src/shared')
|
|
}
|
|
},
|
|
test: {
|
|
include: ['test/**/*.test.ts'],
|
|
environment: 'node'
|
|
}
|
|
})
|