add more tests!

This commit is contained in:
41666 2019-03-30 09:17:11 -05:00
parent 77bf715b7b
commit f7e2898633
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF
11 changed files with 241 additions and 38 deletions

View file

@ -0,0 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<DiscordButton /> renders correctly 1`] = `
<discord-button__Button>
<discord-button__ButtonIcon
src="/static/discord-logo.svg"
/>
 
Hello!
</discord-button__Button>
`;

View file

@ -0,0 +1,91 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`<DiscordGuildPic /> falls-back to a default when things go bad. 1`] = `
.c0 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-color: var(--fallback-color);
}
<DiscordGuildPic
icon="aaa"
id="0000"
name="Mock"
>
<discord-guild-pic__Fallback
serverName="Mock"
style={
Object {
"--fallback-color": "hsl(77,50%,50%)",
}
}
>
<StyledComponent
forwardedComponent={
Object {
"$$typeof": Symbol(react.forward_ref),
"attrs": Array [],
"componentStyle": ComponentStyle {
"componentId": "discord-guild-pic__Fallback-d55lwu-0",
"isStatic": true,
"lastClassName": "c0",
"rules": Array [
"display:flex;justify-content:center;align-items:center;background-color:var(--fallback-color);",
],
},
"displayName": "discord-guild-pic__Fallback",
"foldedComponentIds": Array [],
"render": [Function],
"styledComponentId": "discord-guild-pic__Fallback-d55lwu-0",
"target": "div",
"toString": [Function],
"warnTooManyClasses": [Function],
"withComponent": [Function],
}
}
forwardedRef={null}
serverName="Mock"
style={
Object {
"--fallback-color": "hsl(77,50%,50%)",
}
}
>
<div
className="c0"
style={
Object {
"--fallback-color": "hsl(77,50%,50%)",
}
}
>
M
</div>
</StyledComponent>
</discord-guild-pic__Fallback>
</DiscordGuildPic>
`;
exports[`<DiscordGuildPic /> renders a snapshot 1`] = `
<DiscordGuildPic
icon="aaa"
id="0000"
name="Mock"
>
<img
onError={[Function]}
onLoad={[Function]}
src="https://cdn.discordapp.com/icons/0000/aaa.png"
/>
</DiscordGuildPic>
`;