fix: Readd and fix App unittest

This commit is contained in:
Chi Vinh Le
2018-10-08 20:53:02 +02:00
parent ec539c2dae
commit b69313a01e
2 changed files with 50 additions and 0 deletions
@@ -0,0 +1,16 @@
import { shallow } from "enzyme";
import noop from "lodash";
import React from "react";
import { PropTypesOf } from "talk-framework/types";
import App from "./App";
it("renders comments", () => {
const props: PropTypesOf<typeof App> = {
activeTab: "COMMENTS",
onTabClick: noop,
};
const wrapper = shallow(<App {...props} />);
expect(wrapper).toMatchSnapshot();
});
@@ -0,0 +1,34 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders comments 1`] = `
<withPropsOnChange(HorizontalGutter)
className="App-root"
>
<withPropsOnChange(TabBar)
activeTab="COMMENTS"
onTabClick={[Function]}
>
<CommentsTab
tabId="COMMENTS"
/>
<MyProfileTab
tabId="PROFILE"
/>
</withPropsOnChange(TabBar)>
<TabContent
activeTab="COMMENTS"
className="App-tabContent"
>
<TabPane
tabId="COMMENTS"
>
<withContext(withLocalStateContainer(CommentsPaneContainer)) />
</TabPane>
<TabPane
tabId="PROFILE"
>
<withContext(withLocalStateContainer(ProfileQuery)) />
</TabPane>
</TabContent>
</withPropsOnChange(HorizontalGutter)>
`;