From 6be6357166b5419e6de561c6e61bcedd6ab79893 Mon Sep 17 00:00:00 2001 From: 4gray Date: Thu, 8 Oct 2026 18:10:05 +0200 Subject: [PATCH] test(tools): cover a keyframe run by another module's mixin Since #1795 the second reading also starts when an included mixin from another module runs a keyframe that does not hold its frame. Its references went through the same wrapper and were dropped the same way; cover that path too. Co-Authored-By: Claude Opus 5.5 --- tools/nx/check-font-weights.test.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/nx/check-font-weights.test.mjs b/tools/nx/check-font-weights.test.mjs index 8c6afee64..fa40ebcfc 100644 --- a/tools/nx/check-font-weights.test.mjs +++ b/tools/nx/check-font-weights.test.mjs @@ -4973,6 +4973,21 @@ test('follows a weight variable in either reading of a keyframe that does not ho ]) { assert.deepEqual(report(source), expected, source); } + // And where another module's mixin runs it. + for (const [run, expected] of [ + ['k 1ms', ['libs/s11/c.scss:2 $w: 700']], + ['k 1ms forwards', []], + ]) { + const face = `@mixin face { font-family: ${mono}; animation: ${run}; }`; + assert.deepEqual( + workspace({ + 'libs/s11/_type.scss': `${roboto}\n${face}`, + 'libs/s11/c.scss': `@use 'type';\n$w: 700;\n.x { @include type.face; font-weight: $w; }`, + }), + expected, + run + ); + } }); test('reads an `@at-root` rule where Sass writes it out', () => {