A token pipeline whose output is a stylesheet, and no test at all because the transforms had unit tests.
test('generated tokens match the snapshot', async () => {
const css = await build(tokens)
await expect(css).toMatchFileSnapshot('./__snapshots__/tokens.css')
})
// which caught: a transform reordering custom properties
// after a dependency bump, so a var() referenced one
// declared below it.
Unit tests on each transform proved every stage correct and said nothing about the composition, which is where the bug was. A snapshot of the final artefact is a weak assertion and it is the only one that covers the pipeline as a whole — and unlike most snapshot tests, this one is on a file that is genuinely generated and genuinely reviewed when it changes.