我有下一个代码:
import styled from "styled-components/native";
const BaseTitle = styled.Text`
font-size: 18;
font-weight: bold;
color: #111;
`;
function Title({ title }) {
return <BaseTitle>№{title}</BaseTitle>;
}
如何正确检查应包含字符№的字符串和已传输的字符串?
test("Title render", () => {
const tree = shallow(<Title title="123123" />);
expect(?????).toContain("№123123");
});