Skip to content

Commit

Permalink
test(box): revert defaultprops
Browse files Browse the repository at this point in the history
  • Loading branch information
theetrain committed Nov 8, 2017
1 parent f9cbc2a commit 0b36da6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/components/Box/__tests__/Box.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ import { shallow } from 'enzyme'
import Box from '../Box'

describe('Box', () => {
const doShallow = (props = {}) => shallow(<Box {...props}>Some content</Box>)
const defaultProps = { between: 3 }
const doShallow = (props = {}) =>
shallow(
<Box {...defaultProps} {...props}>
Some content
</Box>
)

it('renders', () => {
const box = doShallow()
Expand Down
4 changes: 3 additions & 1 deletion src/components/Box/__tests__/__snapshots__/Box.spec.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Box renders 1`] = `
<div>
<div
className="betweenBottomMargin-3"
>
Some content
</div>
`;

0 comments on commit 0b36da6

Please sign in to comment.