describe("when given `hoverStyle` prop", function () {
$sha$| 10 $| 10 it("it applies `hoverStyle` onMouseEnter", function () {
$res$| 11 $| 11 shallowRenderer.render(<InterfacesIcon name="" hoverStyle={{ color: "blue" }} />);
$exp$| 12 } | 12 let result = shallowRenderer.getRenderOutput();
$; | 13 | 13
$ | 14 cl$| 14 expect(result.props.style).toEqual({});
$ | 15 $| 15
$rib$| 16 $| 16 let mockEvent = {};
$ | 17 | 17 result.props.onMouseEnter(mockEvent);
$ Er$| 18 $| 18 let postEventResult = shallowRenderer.getRenderOutput();
$ Tu$| 19 | 19
$ | 20 $| 20 expect(postEventResult.props.style.color).toBe("blue");
$ sh$| 21 $| 21 });
$ re$| 22 $| 22 });
this line got me in trouble a lot.
expected: undefined toEqual { ... }
99 describe("when `name` is invalid", () => {
100 let sandbox;
101
102 beforeEach(() => {
103 sandbox = sinon.sandbox.create();
104 });
105
106 afterEach(() => {
107 sandbox.restore();
108 });
109
110 it("it logs 'Failed propType' warning", () => {
111 sandbox.spy(console, "warn");
112 shallowRenderer.render(<AppIcon />);
113
114 expect(console.warn.callCount).to.equal(1);
115 });
116
117 it("it logs 'Failed propType' warning", () => {
118 sandbox.spy(console, "warn");
119 shallowRenderer.render(<AppIcon name="wat" />);
120
121 expect(console.warn.callCount).to.equal(1);
122 });
123 });