Skip to content

Commit

Permalink
fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrotti committed Feb 25, 2022
1 parent e02c828 commit 7b94bb7
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Label_deprecated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,7 @@ Label.defaultProps = {
variant: 'medium'
}

Label.displayName = 'Label'

export type LabelProps = ComponentProps<typeof Label>
export default Label
2 changes: 1 addition & 1 deletion src/__tests__/Label_deprecated.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ expect.extend(toHaveNoViolations)
describe('Label_deprecated', () => {
behavesAsComponent({Component: Label})

checkExports('Label', {
checkExports('Label_deprecated', {
default: Label
})

Expand Down
73 changes: 73 additions & 0 deletions src/__tests__/__snapshots__/Label_deprecated.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Label_deprecated renders consistently 1`] = `
.c0 {
display: inline-block;
font-weight: 500;
color: #ffffff;
border-radius: 100px;
background-color: #6e7781;
font-size: 12px;
line-height: 20px;
padding: 0 8px;
}
.c0:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
<span
className="c0"
/>
`;

exports[`Label_deprecated respects the "outline" prop 1`] = `
.c0 {
display: inline-block;
font-weight: 500;
color: #ffffff;
border-radius: 100px;
background-color: #6e7781;
font-size: 12px;
line-height: 20px;
padding: 0 8px;
margin-top: -1px;
margin-bottom: -1px;
color: #57606a;
border: 1px solid #d0d7de;
box-shadow: none;
background-color: transparent;
}
.c0:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
<span
className="c0"
/>
`;

exports[`Label_deprecated respects the "variant" prop 1`] = `
.c0 {
display: inline-block;
font-weight: 500;
color: #ffffff;
border-radius: 100px;
background-color: #6e7781;
font-size: 14px;
line-height: 16px;
padding: 8px 12px;
}
.c0:hover {
-webkit-text-decoration: none;
text-decoration: none;
}
<span
className="c0"
/>
`;

0 comments on commit 7b94bb7

Please sign in to comment.