diff --git a/docs/diagrams/export-svg.test.mjs b/docs/diagrams/export-svg.test.mjs
index 2fdd77ba..7a355643 100644
--- a/docs/diagrams/export-svg.test.mjs
+++ b/docs/diagrams/export-svg.test.mjs
@@ -84,6 +84,16 @@ test('export keeps the tspan space and applies tokens and drops the viewer layer
const r = spawnSync(process.execPath, [script, 'export', html, out, 'light', 'T', 'D'], { encoding: 'utf8' });
assert.equal(r.status, 0, r.stderr);
const svg = readFileSync(out, 'utf8');
+ // The rectangle bounds the text, so font metrics do not affect this crop.
+ const expected = '';
+ assert.equal(svg, expected);
assert.ok(svg.includes('>Hello