UNPKG

vcc-ui

Version:

VCC UI is a collection of React UI Components that can be used for developing front-end applications at Volvo Car Corporation.

35 lines (33 loc) 1.01 kB
import React from "react"; import { Radio } from "."; import createSnapshot from "../../test/create-snapshot"; var onChange = function onChange() {}; describe("<Radio /> snapshot tests", function () { it("renders <Radio /> correctly with default props", function () { var snapshot = createSnapshot(React.createElement(Radio, { name: "test", checked: false, onChange: onChange })); expect(snapshot).toMatchSnapshot(); }); it("renders <Radio /> correctly with checked prop", function () { var snapshot = createSnapshot(React.createElement(Radio, { name: "test", checked: true, onChange: onChange })); expect(snapshot).toMatchSnapshot(); }); it("renders <Radio /> without overriding styles", function () { var snapshot = createSnapshot(React.createElement(Radio, { name: "test", checked: false, extend: { display: "none" }, onChange: onChange })); expect(snapshot).toMatchSnapshot(); }); });