menu

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Team
Posts
Members
Info

I keep getting an "keyframe" error in Jest tests

I have a strange bug, that I have had problems reproducing outside of our environment and as such have a hard time filing as an actual bug, but it is linked to my update of styled-components from version 4.1.2 to 4.2.1. I hope any of you have any ideas. Our setup We have two…

thumbsup
0
message-simple
2

how to test a react component that renders Prismic RichText data

Trying to add some tests to mock a RichText property for a component. Can anyone help

thumbsup
0
message-simple
0

RN + Cannot create styled-component for component: undefined

Testing with React Native and Jest produce the next error: Anyone with similar issues?

thumbsup
0
message-simple
0

I can't mount with context after upgrading to react 16.6 and Styled Components…

I'm trying to run test with enzyme and I need to render some components which use properties from my global theme. Before I had to do something like But I noticed that getChildContext is not a function anymore so I thought about switching to this …

thumbsup
1
message-simple
10

Styled Components v4 + jest-styled-components

Seems like getting jest-styled-components working for v4 is a work in progress, does anyone know of any utilities to make testing styles achievable in the short term using react-testing-library? I dont' need snapshot testing until JSC is ready for v4 just want to test that…

thumbsup
3
message-simple
7

Error in storybook with jest-styled-components

I've got some error, when I try to launch storybook on my repo, the first is : ```Module not found: Error: Can't resolve 'styled-components/lib/models/StyleSheet'``` And the second one : …

thumbsup
0
message-simple
0

Testing a createGlobalStyle

Is there a good way to test a global style? e.g. For example just to be sure to get a hint that something was changed in this globalStyle to be sure no changes are applied without knowing, e.g. if someone is just trying out something. …

thumbsup
0
message-simple
14

styled-component/macro fileName:false

i have above config in package.json above config was added to remove fileName prefix of styled-component it works as expected in react devtool …

thumbsup
0
message-simple
0

testing react-native/expo app with styled components

I'm getting this error: My test file is super simple: This is my app.js file: …

thumbsup
0
message-simple
1

Testing keyframes

I've got this component which sole purpose is to animate the child component. It works fine, but i can't figure out how to test it correctly. Here's the test i wrote to test if the animation style rule is applied: it('should use the slide up animation', () => { const…

thumbsup
0
message-simple
0