@findify/react-components
Version:
Findify react UI components
33 lines • 923 B
JavaScript
import { shallow } from 'enzyme';
var theme = {
"rating": "findify-components--cards--product--rating__rating",
"stars": "findify-components--cards--product--rating__stars",
"star": "findify-components--cards--product--rating__star",
"filled": "findify-components--cards--product--rating__filled",
"count": "findify-components--cards--product--rating__count"
};
import Rating from "./view";
import { jsx as _jsx } from "react/jsx-runtime";
describe('Rating', function () {
it('renders correctly', function () {
var cases = [{
value: 2,
count: 2
}, {
value: 0,
count: 0
}, {
value: 5,
count: 10
}];
cases.map(function (_ref) {
var value = _ref.value,
count = _ref.count;
return expect(shallow( /*#__PURE__*/_jsx(Rating, {
value: value,
count: count,
theme: theme
}))).toMatchSnapshot();
});
});
});