ucdbiadv-icon
Advanced tools
Comparing version
{ | ||
"name": "ucdbiadv-icon", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Icon", | ||
@@ -11,5 +11,5 @@ "main": "dist/index.js", | ||
"styled-components": "^2.2.3", | ||
"ucdbiadv-material-color-picker": "^1.0.10", | ||
"ucdbiadv-material-color-picker": "^1.0.11", | ||
"webfontloader": "^1.6.28" | ||
} | ||
} |
@@ -7,24 +7,11 @@ import React from "react" | ||
import RaisedButton from "." | ||
import Icon from "." | ||
describe("tests for <FlatButton>", function() { | ||
describe("tests for <Icon>", function() { | ||
it("renders without props", function() { | ||
const wrapper = mount(<RaisedButton />) | ||
const button = wrapper.find("div") | ||
const wrapper = mount(<Icon />) | ||
const button = wrapper.find("i") | ||
expect(button.length).toBe(2) | ||
expect(button.length).toBe(1) | ||
}) | ||
it("handles onClick events", () => { | ||
const onClick = jest.fn() | ||
const wrapper = mount(<RaisedButton onClick={onClick} />) | ||
wrapper.simulate("click") | ||
expect(onClick.mock.calls.length).toBe(1) | ||
}) | ||
it("renders a label", () => { | ||
const wrapper = mount(<RaisedButton label="test" />) | ||
expect(wrapper.text()).toBe("test") | ||
}) | ||
}) |
@@ -14,3 +14,3 @@ import React from "react" | ||
stories.add( | ||
"Material Icons", | ||
"Material Icon", | ||
withInfo({ | ||
@@ -17,0 +17,0 @@ text: "Icon", |
14206
115.83%7
16.67%386
131.14%