kentcdodds/jest-glamor-react
Vedi su GitHubIs there any ways to get style for pseudo-class?
Open
#35 aperta il 11 apr 2018
help wanted
Metriche repository
- Star
- (99 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
jest-glamor-reactversion: v4.2.1nodeversion: v8.9.4npm(oryarn) version: v5.6.0
Relevant code or config
const TestComp = glamorous.div({
'::after': {
backgroundColor: 'white',
},
});
it('should have white background', () => {
const component = enzyme.shallow(<TestComp />);
expect(component).toHaveStyleRule(/* What should I do ??? */);
});
What you did: Try to test pseudo-class style
What happened: No way to test it
Problem description:
Suggested solution: Add some matchers? or add functions to the matcher?