Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
import { describe, expect, it } from "@suaveplan/testing/runner";
import { findChangedTrackIds } from "./undo.js";
describe("findChangedTrackIds", () => {
it("returns empty when tracks are identical", () => {
const t = {
id: "t1",
name: "A",
clips: [],
volume: 1,
pan: 0,
muted: false,
soloed: false,
};
expect(findChangedTrackIds([t], [{ ...t }])).toEqual([]);
});
it("detects removed tracks", () => {
const t = {
id: "t1",
name: "A",
clips: [],
volume: 1,
pan: 0,
muted: false,
soloed: false,
};
expect(findChangedTrackIds([t], [])).toEqual(["t1"]);
});
it("detects added tracks", () => {
const t = {
id: "t1",
name: "A",
clips: [],
volume: 1,
pan: 0,
muted: false,
soloed: false,
};
expect(findChangedTrackIds([], [t])).toEqual(["t1"]);
});
it("detects changed tracks", () => {
const a = {
id: "t1",
name: "A",
clips: [],
volume: 1,
pan: 0,
muted: false,
soloed: false,
};
const b = {
id: "t1",
name: "B",
clips: [],
volume: 1,
pan: 0,
muted: false,
soloed: false,
};
expect(findChangedTrackIds([a], [b])).toEqual(["t1"]);
});
});