The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.
TypeScript agent-skillsagentic-aiai-agentsai-videobyokclaude-codecodexdeepseek-harnessdsh-plugingenerative-ailocal-firstmcpmotionmotion-graphicsmultimodalopenmotionreverse-engineeringvideo-editingvideo-generationworkbuddy
// @vitest-environment happy-dom
import { beforeEach, describe, expect, it, vi } from "vitest";
import { makeStudioDebugLogger } from "./studioDebug";
describe("makeStudioDebugLogger", () => {
beforeEach(() => {
localStorage.clear();
vi.restoreAllMocks();
});
it("does no console work while its channel is disabled", () => {
const log = vi.spyOn(console, "log").mockImplementation(() => undefined);
const buildDetails = vi.fn(() => ({ expensive: true }));
makeStudioDebugLogger("commit")("persisted", buildDetails);
expect(buildDetails).not.toHaveBeenCalled();
expect(log).not.toHaveBeenCalled();
});
it("logs only after its exact channel is enabled", () => {
localStorage.setItem("hf-commit-debug", "1");
const log = vi.spyOn(console, "log").mockImplementation(() => undefined);
makeStudioDebugLogger("commit")("persisted", { mutations: 2 });
expect(log).toHaveBeenCalledOnce();
expect(log.mock.calls[0]?.[0]).toContain('[hf-commit] {"stage":"persisted"');
expect(log.mock.calls[0]?.[0]).toContain('"mutations":2');
});
});