Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: assert native excerpt cleanup paths (#10704)

Adam Eivy1202f6bf2db9
diff --git a/server/services/musicVideo/excerptRender.test.js b/server/services/musicVideo/excerptRender.test.js
index 6d8889f349..4bed2341d3 100644
--- a/server/services/musicVideo/excerptRender.test.js
+++ b/server/services/musicVideo/excerptRender.test.js
@@ -1,4 +1,5 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
+import { join } from 'node:path';
const h = vi.hoisted(() => {
const emitter = () => {
@@ -94,7 +95,7 @@ describe('excerpt render cancellation', () => {
musicVideoEvents.off('excerpt-render', onRender);
expect(terminalFrames(jobId)).toEqual([{ type: 'canceled', error: 'Render cancelled' }]);
expect(excerpt(id, excerptId)).toMatchObject({ status: 'canceled', filename: null, partialFilename: null, jobId: null, renderingOn: null, error: null });
- expect(unlink.mock.calls).toEqual([[`/test/videos/${partialFilename}`]]);
+ expect(unlink.mock.calls).toEqual([[join('/test/videos', partialFilename)]]);
expect(events).toEqual([{ projectId: id, excerptId, status: 'canceled' }]);
expect(cancelExcerptRender(jobId)).toBe(false);
const again = await startExcerptRender(id, { startSec: 0, endSec: 2 });