Repository navigation
test(templates): render every template with satori - #137
Merged
Merged
Conversation
anurag629
approved these changes
Oct 16, 2026
anurag629
left a comment
Member
There was a problem hiding this comment.
Thanks @prakashNalla, nice one. I ran it on top of dev: all 220 renders take about a second, and taking display: 'flex' off the outer div in blog/minimal-dark.ts fails both of its cases with the Satori error, same as you said. npm run check and all 470 tests pass. Merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
tests/templates/render.test.ts, which runs Satori at 1200x630 on every template fromgetAllTemplates(): once with its defaults, and once with every non-requiredtext/textareafield set to''. The 8 fonts are read frompublic/fontswithfs, so it doesn't go throughog-engine.tsorfont-loader.ts. Test names include the template id. Also updated the line in CONTRIBUTING.md that said the tests don't run Satori yet.Closes #78
How I Tested This
npm run check(0 errors, 0 warnings) andnpm run test(21 files / 470 tests pass) on Node v22.23.3display: 'flex'from the outer multi-child div inblog/minimal-dark.ts(not committed): bothblog-minimal-darkcases fail withExpected <div> to have explicit "display: flex" or "display: none" if it has more than one child node.Put it back and they pass.AI Assistance
Claude helped me write the tests.
Type of Change
Screenshots
N/A, tests and one line of docs.
Checklist
devnpm run checkpassesnpm run testpassesnpm run dev