mirror of
https://github.com/wassname/talk.git
synced 2026-07-07 09:53:01 +08:00
Added missing dependency and test updated
This commit is contained in:
Generated
+7
-2
@@ -1783,6 +1783,7 @@
|
||||
"version": "16.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-16.4.2.tgz",
|
||||
"integrity": "sha512-oVcVteCDNiVc/fkDjowRfAZQDEOR76j3CJ3FvwXNvfV6zJguhghy1lMgpAzYox+9AZsWch+JPV6Imml3wvIUeg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"csstype": "^2.2.0"
|
||||
}
|
||||
@@ -1791,6 +1792,7 @@
|
||||
"version": "4.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-copy-to-clipboard/-/react-copy-to-clipboard-4.2.5.tgz",
|
||||
"integrity": "sha512-5LggaWWlMcgehfeDmr4FZmK8MXntzxLYERFdrXk72ye6QwpoZpyYFGgUM+xGVVtIP2WXlor8twZTXK1xckEDYw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
@@ -1832,6 +1834,7 @@
|
||||
"version": "3.3.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-tooltip/-/react-tooltip-3.3.5.tgz",
|
||||
"integrity": "sha512-wpWzjtMWBPymIoYjqZTeWX1v5dJe4V1akmcTM6iZwSS/cL8jdi6dFt4BoLXDOxgL5tEe/9yVBlQD+MAYvexBfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
@@ -6651,7 +6654,8 @@
|
||||
"csstype": {
|
||||
"version": "2.5.5",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-2.5.5.tgz",
|
||||
"integrity": "sha512-EGMjeoiN3aqEX5u/cyH5mSdGBDGdLcCQvcEcBWNGFSPXKd9uOTIeVG91YQ22OxI44DKpvI+4C7VUSmEpsHWJaA=="
|
||||
"integrity": "sha512-EGMjeoiN3aqEX5u/cyH5mSdGBDGdLcCQvcEcBWNGFSPXKd9uOTIeVG91YQ22OxI44DKpvI+4C7VUSmEpsHWJaA==",
|
||||
"dev": true
|
||||
},
|
||||
"currently-unhandled": {
|
||||
"version": "0.4.1",
|
||||
@@ -20410,7 +20414,8 @@
|
||||
"simulant": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simulant/-/simulant-0.2.2.tgz",
|
||||
"integrity": "sha1-8bzlJxK2p6DaON392n6DsgsdoB4="
|
||||
"integrity": "sha1-8bzlJxK2p6DaON392n6DsgsdoB4=",
|
||||
"dev": true
|
||||
},
|
||||
"sinon": {
|
||||
"version": "6.1.3",
|
||||
|
||||
@@ -15,5 +15,12 @@ exports[`renders username and body 1`] = `
|
||||
<withPropsOnChange(Typography)>
|
||||
Woof
|
||||
</withPropsOnChange(Typography)>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
>
|
||||
<withContext(LocalStateContainer)
|
||||
commentID="comment-id"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
import { shallow } from "enzyme";
|
||||
import React from "react";
|
||||
|
||||
import { render } from "./AppQuery";
|
||||
import PermalinkViewContainer from "talk-stream/containers/PermalinkViewContainer";
|
||||
import AppContainer from "../containers/AppContainer";
|
||||
import { renderWrapper } from "./AppQuery";
|
||||
|
||||
it("renders permalink view", () => {
|
||||
const data = {
|
||||
props: {} as any,
|
||||
error: null,
|
||||
};
|
||||
const component = renderWrapper(PermalinkViewContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("renders app", () => {
|
||||
const data = {
|
||||
props: {} as any,
|
||||
error: null,
|
||||
};
|
||||
const wrapper = shallow(React.createElement(() => render(data)));
|
||||
const component = renderWrapper(AppContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -17,7 +30,8 @@ it("renders loading", () => {
|
||||
props: null,
|
||||
error: null,
|
||||
};
|
||||
const wrapper = shallow(React.createElement(() => render(data)));
|
||||
const component = renderWrapper(AppContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -26,6 +40,7 @@ it("renders error", () => {
|
||||
props: null,
|
||||
error: new Error("error"),
|
||||
};
|
||||
const wrapper = shallow(React.createElement(() => render(data)));
|
||||
const component = renderWrapper(AppContainer);
|
||||
const wrapper = shallow(React.createElement(() => component(data)));
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
|
||||
@@ -17,3 +17,9 @@ exports[`renders loading 1`] = `
|
||||
Loading
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`renders permalink view 1`] = `
|
||||
<Relay(PermalinkViewContainer)
|
||||
data={Object {}}
|
||||
/>
|
||||
`;
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`loads more comments 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,6 +106,9 @@ exports[`loads more comments 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -132,6 +138,9 @@ exports[`loads more comments 1`] = `
|
||||
>
|
||||
Hey!
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -213,6 +222,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -242,6 +254,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,6 +106,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
I like yoghurt
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="Indent-root Indent-level0"
|
||||
@@ -136,6 +142,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
role="article"
|
||||
@@ -161,6 +170,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@@ -103,6 +106,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -74,6 +74,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="Indent-root Indent-level0"
|
||||
@@ -107,6 +110,9 @@ exports[`renders comment stream 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
aria-controls="talk-comments-replyList-log--comment-0"
|
||||
@@ -205,6 +211,9 @@ exports[`show all replies 1`] = `
|
||||
>
|
||||
Joining Too
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="Indent-root Indent-level0"
|
||||
@@ -238,6 +247,9 @@ exports[`show all replies 1`] = `
|
||||
>
|
||||
What's up?
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
role="article"
|
||||
@@ -263,6 +275,9 @@ exports[`show all replies 1`] = `
|
||||
>
|
||||
Hey!
|
||||
</p>
|
||||
<div
|
||||
className="Comment-footer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,6 @@ type Placement =
|
||||
|
||||
interface InnerProps {
|
||||
body: (props: RenderProps) => any | React.ReactElement<any>;
|
||||
// body: React.ReactElement<any> | null;
|
||||
children: (props: RenderProps) => any;
|
||||
description?: string;
|
||||
id?: string;
|
||||
|
||||
Reference in New Issue
Block a user