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

RN + Cannot create styled-component for component: undefined

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

thumbsup
1
message-simple
2

I've updated to styled-components v5 beta and my jest-styled-components breaks

I've recently update my codebase to use the beta v5 of styled-components and my entire test-suite fails now! I'm using jest-styled-components which was working fine until today and now I'm getting the error Could neither find styled-components secret internals nor…

thumbsup
0
message-simple
2

Testing styled component

Does anybody have example of testing styled component? If please provide me

thumbsup
0
message-simple
1

In the jest-styled-components package, what is __PRIVATE__?

In src/utils.js on line 2, __PRIVATE__ is imported from styled-components. What is this? https://github.com/styled-components/jest-styled-components/blob/d140dd069f27ead5d123c1744c981952daa29f38/src/utils.js#L2

thumbsup
0
message-simple
1

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

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