mirror of
https://github.com/prymitive/karma
synced 2026-05-21 04:33:07 +00:00
20 lines
512 B
JavaScript
20 lines
512 B
JavaScript
import React from "react";
|
|
|
|
import { shallow } from "enzyme";
|
|
|
|
import toDiffableHtml from "diffable-html";
|
|
|
|
import { ToggleIcon } from ".";
|
|
|
|
describe("<ToggleIcon />", () => {
|
|
it("matches snapshot when open", () => {
|
|
const tree = shallow(<ToggleIcon isOpen={true} />);
|
|
expect(toDiffableHtml(tree.html())).toMatchSnapshot();
|
|
});
|
|
|
|
it("matches snapshot when closed", () => {
|
|
const tree = shallow(<ToggleIcon isOpen={false} />);
|
|
expect(toDiffableHtml(tree.html())).toMatchSnapshot();
|
|
});
|
|
});
|