How to test styled components conditionally and children elements?
问题 I'm new to unit testing and I've spent some 20-30 hours in docs, articles and YT videos but still can't make sense of how to achieve this. Basically I want to test 3 things here: Make sure that this component renders 3 components Test the conditional styling Test the click event So far, for the 1st thing, if I try to do: import { shallow } from "enzyme"; import React from "react"; import ButtonsComponent, { SchedButton } from "./ButtonsComponent"; it("renders three <MyButton /> components", (