I'd be great to have an API to take snapshots of just styles or specific rules. The API would be basically the same as toHaveStyleRule, but would do snapshot generation/matching instead.
// All styles as normal snapshot
expect(component).toMatchStyleSnapshot()
// Single rule as inline snapshot
expect(component).toMatchInlineStyleSnapshot('transform')
That would prevent users from having to manually record the output, and is much more terse than taking a snapshot of the entire DOM tree and every style.
I'd be great to have an API to take snapshots of just styles or specific rules. The API would be basically the same as
toHaveStyleRule, but would do snapshot generation/matching instead.That would prevent users from having to manually record the output, and is much more terse than taking a snapshot of the entire DOM tree and every style.