kv-music/js/ffmpeg.test.ts
Daniel b94a832d2e feat(vitest): add vitest config and tests
Add tests for HiFi, ffmpeg, and download api functions.
2026-04-01 12:46:30 -05:00

19 lines
532 B
TypeScript

import { expect, test, suite } from 'vitest';
import { ffmpeg } from './ffmpeg';
test('Run `ffmpeg --help`', async () => {
const lines: string[] = [];
const info = await ffmpeg(null, {
rawArgs: ['--help'],
logConsole: false,
outputName: null,
onProgress: (progress) => {
if (progress.stage == 'stdout') {
lines.push(progress.message);
}
},
});
expect(lines).length.greaterThan(0);
expect(lines[0]).matches(/ffmpeg version/i);
});