mirror of
https://github.com/wassname/talk.git
synced 2026-08-03 13:20:59 +08:00
fix: Readd and fix App unittest
This commit is contained in:
@@ -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)>
|
||||
`;
|
||||
Reference in New Issue
Block a user