This repository demonstrates a minimal setup for using jest-styled-components
with the storybook
test-runner
. The purpose of this setup is to facilitate understanding of the integration issues between jest-styled-components
and storybook
.
The code in this repository is currently non-operational. It illustrates compatibility issues between jest-styled-components
and the storybook
test-runner. We are seeking community support and suggestions to resolve this issue.
jest-styled-components
: 7.2.0storybook
: 7.6.7test-runner
: 0.16.0
The snapshots generated by the test-runner
appear as follows:
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[\`Button Default smoke-test 1\`] = \`
<button class="sc-beySPh fvFDzo">
default button
</button>
\`;
This snapshot represents the result of rendering React components through a headless browser, which is the approach taken by the storybook
test-runner
. It is important to note that this results in a format different from what jest-styled-components
expects, which typically involves ReactNode or HTMLElement.