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.

46 lines 1.53 kB
import React from "react"; import { TabNavItem } from "."; import createSnapshot from "../../test/create-snapshot"; describe("<TabNavItem /> snapshot tests", function () { it("renders correctly with default props", function () { var snapshot = createSnapshot(React.createElement(TabNavItem, null, "Children")); expect(snapshot).toMatchSnapshot(); }); it("renders correctly with isActive=true", function () { var snapshot = createSnapshot(React.createElement(TabNavItem, { isActive: true }, "Children")); expect(snapshot).toMatchSnapshot(); }); it("renders correctly with variant='reverse-out'", function () { var snapshot = createSnapshot(React.createElement(TabNavItem, { variant: "reverse-out" }, "Children")); expect(snapshot).toMatchSnapshot(); }); it("renders correctly with isActive=true and variant='reverse-out'", function () { var snapshot = createSnapshot(React.createElement(TabNavItem, { isActive: true, variant: "reverse-out" }, "Children")); expect(snapshot).toMatchSnapshot(); }); it("renders correctly with theme", function () { var theme = { navItem: { backgroundColor: "green", padding: "20px", color: "black" }, navItemArrows: { color: "white", size: "16" } }; var snapshot = createSnapshot(React.createElement(TabNavItem, { dropdown: true, isActive: true }, "Children"), theme); expect(snapshot).toMatchSnapshot(); }); });