Mateusz Burzyński
Mateusz Burzyński
Emotion maintainer here 👋 Note that we forgot to add a worker condition in `@emotion/cache`. So it's not that surprising that this particular package still didn't work here. I've just...
> @Andarist I wonder if this behavior could changed, such as not tree shaking those conditions, and let runtime to handle it. I tested if I add those checks back,...
If you suggest that Emotion should remove a browser field from its conditions then I don't think it's a viable strategy for us. It shifts the responsibility to drop the...
> @Andarist would it be worth seeing/testing what the bundle size/performance impact would be to keep these checks in place for e.g. document / window availability within the browser bundle?...
> enzyme doesn't support or endorse snapshot-based testing; it's brittle and leads to folks rubberstamping changes they shouldn't. I agree with this sentiment but some of our (Emotion) users depend...
> The entire point of snapshot testing is to expose all those internals. Why would it be ideal to provide a fictional snapshot? Doesn't that defeat the entire alleged purpose...
> It sounds like this is a scenario where someone's making a snapshot of a component they didn't author, which is confusing to me. This is the case here. With...
Emotion is using jsx pragma with React - we forward calls to React.createElement: https://github.com/emotion-js/emotion/blob/f046ae40bcae24400068311690a94ba2dbf20344/packages/react/src/jsx.js So we dont quite need custom enzyme adapters at all.
Hm, I'm not sure if I totally understand the point here. Maybe we could provide a custom adapter and thus gain control over this. It seems like a lot of...
Well, I've raised this mostly because I had a need for this and this would make my life slightly easier. It isn't something I'm desperate for (I've also implemented an...