# Claude Code wrote unit tests for a 15-second video

Original title: My video has unit tests

> Hacker News story 50260619 · language: en · submitted 2026-10-27
> Web version: https://zeli.app/story/50260619
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 26 · by [Vieltrinker](<https://news.ycombinator.com/user?id=Vieltrinker>) · 💬 11
[original](<https://pertiller.tech/blog/my-video-written-in-code/>) · [HN discussion](<https://news.ycombinator.com/item?id=50260619>)

## Summary

For a Petroly promo video, Claude Code built a JavaScript renderer where each frame is a function of time: time goes in, an SVG comes out, sharp turns it into pixels, and FFmpeg encodes it. The agent then wrote automated tests asserting that the push notification can't appear before the price hits its target, that no frame contains NaN, and that the cheapest station's checkmark waits for the rows to settle. Twelve localized versions share one renderer.

## Key quote

> The same tools I use to protect an app's behaviour can protect the behaviour of its video.

## HN discussion (11 comments)

### [ripley12](<https://news.ycombinator.com/item?id=50263102>)

> I couldn’t finish this. Please write your own blog posts.

### [narrowtux](<https://news.ycombinator.com/item?id=50262837>)

> If you think about it, a video editor is just an IDE for the code of the video project file

### [shawabawa3](<https://news.ycombinator.com/item?id=50261559>)

> Sigh, too many triplet sentences.
>
> Not enough commas. Short and punchy. This is slop.
>
> Vaguely interesting but if there's one part of your project you need to do by hand it's the blog posts

---

## Cite

- Page: https://zeli.app/story/50260619
- Date: 2026-10-27
- Source: pertiller.tech (https://pertiller.tech/blog/my-video-written-in-code/)
- Hacker News: https://news.ycombinator.com/item?id=50260619

## Other languages

- zh: https://zeli.app/zh/story/50260619 · markdown: https://zeli.app/zh/story/50260619.md
- ja: https://zeli.app/ja/story/50260619 · markdown: https://zeli.app/ja/story/50260619.md
- ko: https://zeli.app/ko/story/50260619 · markdown: https://zeli.app/ko/story/50260619.md
- de: https://zeli.app/de/story/50260619 · markdown: https://zeli.app/de/story/50260619.md
- es: https://zeli.app/es/story/50260619 · markdown: https://zeli.app/es/story/50260619.md
- ru: https://zeli.app/ru/story/50260619 · markdown: https://zeli.app/ru/story/50260619.md
