emotion v1.0.0-next.3 Release Notes
Release Date: 2020-08-18 // over 3 years ago-
Patch Changes
💅
dc1a0c5e
#1962 Thanks @Andarist! - From now on an empty<style/>
element gets inserted eagerly into the DOM in the constructor in non-production environments. This helps to grab usedkey
s from the (JS)DOM even for sheets/caches that have not inserted any actual rules to the document yet. It allows@emotion/jest
to find those and serialize Emotion classes properly in situations like this:import styled from '@emotion/styled/macro'import { render } from '@testing-library/react'const Div = styled.div``test('foo', () =\> {const { container } = render(\<Div /\>)expect(container).toMatchSnapshot()})