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
import { describe, expect, it } from "vitest";
import { resolveOptimisticAttributeValue } from "./useDomEditAttributeCommits";
describe("resolveOptimisticAttributeValue", () => {
it("removes an HTML boolean attribute when the value is the literal string false", () => {
expect(resolveOptimisticAttributeValue("loop", "false")).toBeNull();
expect(resolveOptimisticAttributeValue("muted", "false")).toBeNull();
});
it("keeps the literal string false for a non-boolean attribute, matching what persist() writes", () => {
expect(resolveOptimisticAttributeValue("data-example", "false")).toBe("false");
});
it("always removes on null regardless of attribute", () => {
expect(resolveOptimisticAttributeValue("loop", null)).toBeNull();
expect(resolveOptimisticAttributeValue("data-example", null)).toBeNull();
});
it("passes any other value through unchanged", () => {
expect(resolveOptimisticAttributeValue("data-example", "true")).toBe("true");
expect(resolveOptimisticAttributeValue("loop", "true")).toBe("true");
});
});