jaredpalmer

jest-jsxstyle

๐Ÿƒ Jest utilities for JSXStyle

by jaredpalmer

JavaScript

JavaScript100%

Commit activity

Last 12 weeks ยท 0 commits

Full graph โ†’

Community health

1 of 6 standards met

Community profile โ†’
28
โœ“READMEโ—‹Licenseโ—‹Contributingโ—‹Code of Conductโ—‹Issue Templateโ—‹PR Template
chenxsan
Upgrade depsMergedPR

It won't output any with the latest React.js & jsxstyle in my test. Upgrading those deps can fix it in my project.

chenxsan ยท 6y ago
sgwilym

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!

sgwilym ยท 8y ago
sgwilym

Updates this package for the API of jest-jsxstyle@2.0.0, which now exports a cache object with its own API for resetting and adding injection rules. Also makes it so that the serialised CSS rules are pretty printed, which IMO makes them easier to read and look at diffs for.

sgwilym ยท 9y ago
Structured data for AI agents

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.