Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion apps/desktop/src/lib/export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,33 @@ describe("export generation", () => {
expect(parsed.headline).toBe("");
});

it("generates chart summary JSON when export summary is absent", () => {
const songWithoutExportSummary: Partial<RehearsalSong> = { ...mockSong };
delete songWithoutExportSummary.exportSummary;

const parsed = JSON.parse(generateChartSummaryJson(songWithoutExportSummary as RehearsalSong));

expect("exportSummary" in songWithoutExportSummary).toBe(false);
expect(parsed).toMatchObject({
title: "Test",
headline: "",
sections: [
{
label: "verse",
groove: "swing",
roles: [
{
name: "Bass",
chord: "=Cmaj7",
cue: "1, 2, 3",
priority: "high"
}
]
}
]
});
});

it("generates a metadata-only local handoff without source paths or transcription data", () => {
const sourceBootstrap: ProjectBootstrapSummary = {
projectId: "project-1",
Expand Down Expand Up @@ -202,7 +229,7 @@ describe("export generation", () => {
});
});

it("uses the song identity as the default handoff workspace identity", () => {
it("uses the song identity and an empty source asset list as the default handoff identity", () => {
const json = generateMetadataHandoffJson(mockSong, {
createdAt: "2026-06-15T08:30:00.000Z"
});
Expand All @@ -213,6 +240,9 @@ describe("export generation", () => {
title: "Test",
workspaceVersion: 1
});
expect(parsed).toHaveProperty("sourceAssets");
expect(parsed.sourceAssets).toEqual([]);
expect(json).not.toContain("sourcePath");
Comment thread
seonghobae marked this conversation as resolved.
});

it("creates a local re-analysis request from a received handoff and selected replacement asset", () => {
Expand Down