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.
22 lines • 883 B
JavaScript
import React from "react";
import { Click } from ".";
import createSnapshot from "../../test/create-snapshot";
describe("<Click /> snapshot tests", function () {
it("renders <Click /> correctly with default props", function () {
var snapshot = createSnapshot(React.createElement(Click, null, "Children"));
expect(snapshot).toMatchSnapshot();
});
it("renders <Click /> with correct type, when it is a button and no type is specified", function () {
var snapshot = createSnapshot(React.createElement(Click, {
as: "button"
}, "Children"));
expect(snapshot).toMatchSnapshot();
});
it("renders <Click /> with correct type, when it is a button and type is specified", function () {
var snapshot = createSnapshot(React.createElement(Click, {
as: "button",
type: "foo"
}, "Children"));
expect(snapshot).toMatchSnapshot();
});
});