Last 12 weeks ยท 0 commits
1 of 6 standards met
After updating a project using this serialiser to use Jest 22.0.0, I saw that snapshot tests were being broken by extra, nested prints of the styles. It seems as though the function Jest passes to the function has new behaviour in Jest 22, and includes the current serialiser with it. My solution was to reset the variable _before_ creating the printed result, and to make a copy of it beforehand. This means the styles aren't printed in the subsequent serialisations in , and gives us the added bonus of stripping some newlines where they're not necessary. Seems that Jest uses different names for snapshots now, so they changed a lot โ sorry about that! Please let me know if there's anything else that needs tidying up. Thanks!
Repository: jaredpalmer/jest-jsxstyle. Description: ๐ Jest utilities for JSXStyle Stars: 6, Forks: 3. Primary language: JavaScript. Languages: JavaScript (100%). Topics: css, jest, jest-utilities, jsxstyle, snapshot, snapshot-testing. Latest release: v3.0.0 (8y ago). Open PRs: 0, open issues: 0. Last activity: 8y ago. Community health: 28%. Top contributors: jaredpalmer, sgwilym.