Fix errors after rebase

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2019-05-29 20:10:56 -07:00
parent 0ef09e68b4
commit 6c7bda9048
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -18,11 +18,7 @@ export interface NavButtonProps {
onClick?: MouseEventHandler;
}
export default ({
name,
icon,
onClick = e => e.preventDefault()
}: NavButtonProps) => (
export default ({ name, icon, onClick = () => {} }: NavButtonProps) => (
<li className="nav-item">
<a
href="#"
@@ -23,7 +23,7 @@ it("renders with the given icon and name", () => {
it("calls onClick when clicked", () => {
const onClick = jest.fn();
const event = { test: true };
const event = { preventDefault: jest.fn(), test: true };
const wrapper = shallow(
<NavButton name="name" icon="icon" onClick={onClick} />
);