Skip to content

Commit

Permalink
Update tests & snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeSidSmith committed Jun 16, 2017
1 parent d8664ca commit b6569a1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/__snapshots__/spaced-group.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@ exports[`SpacedGroup should match snapshot 1`] = `
/>
`;

exports[`SpacedGroup should take an optional large prop 1`] = `
<span
className="spaced-group large"
/>
`;

exports[`SpacedGroup should take an optional small prop 1`] = `
<span
className="spaced-group small"
/>
`;

exports[`SpacedGroup should take regular element attributes 1`] = `
<span
className="spaced-group my-class"
/>
`;

exports[`SpacedGroup should use a block prop (boolean) as a class name 1`] = `
<span
className="spaced-group block"
/>
`;
24 changes: 24 additions & 0 deletions tests/spaced-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ describe('SpacedGroup', () => {
expect(tree).toMatchSnapshot();
});

it('should take an optional large prop', () => {
const tree = renderer.create(
<SpacedGroup large />
);

expect(tree).toMatchSnapshot();
});

it('should take an optional small prop', () => {
const tree = renderer.create(
<SpacedGroup small />
);

expect(tree).toMatchSnapshot();
});

it('should use a block prop (boolean) as a class name', () => {
const tree = renderer.create(
<SpacedGroup block />
);

expect(tree).toMatchSnapshot();
});

it('should take regular element attributes', () => {
const tree = renderer.create(
<SpacedGroup className="my-class" />
Expand Down

0 comments on commit b6569a1

Please sign in to comment.