Styled-components: How to write Integration Tests?

Created on 11 Jul 2017  路  1Comment  路  Source: styled-components/styled-components

Hello,

I was wondering how you suggest to write integration tests? As I assume that I can not use the generated classes for that, using the whole hierarchy each time seems to be very cumbersome.

Thanks!

Most helpful comment

Check out jest-styled-components for snapshot and unit tests.

For integration tests you should never, not even without SC, rely on classnames, but on custom attributes e.g. a data-tag-id or just an id in some cases

>All comments

Check out jest-styled-components for snapshot and unit tests.

For integration tests you should never, not even without SC, rely on classnames, but on custom attributes e.g. a data-tag-id or just an id in some cases

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maciossek picture maciossek  路  3Comments

chabanov picture chabanov  路  3Comments

robbue picture robbue  路  3Comments

Cap32 picture Cap32  路  3Comments

rohmanhm picture rohmanhm  路  3Comments