forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.test.tsx
More file actions
30 lines (28 loc) · 903 Bytes
/
index.test.tsx
File metadata and controls
30 lines (28 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import 'jest-styled-components';
import React from 'react';
import mountWithTheme from '../../test/themeMount';
import { Button } from '.';
describe('<Button /> rendering', () => {
it('no props', () => {
expect(mountWithTheme(<Button>Le button</Button>)).toMatchSnapshot();
});
it('Danger Button', () => {
expect(mountWithTheme(<Button danger>Le button</Button>)).toMatchSnapshot();
});
it('Secondary Button', () => {
expect(
mountWithTheme(<Button secondary>Le button</Button>)
).toMatchSnapshot();
});
it('Small Button', () => {
expect(mountWithTheme(<Button small>Le button</Button>)).toMatchSnapshot();
});
it('block Button', () => {
expect(mountWithTheme(<Button block>Le button</Button>)).toMatchSnapshot();
});
it('Href Button', () => {
expect(
mountWithTheme(<Button href="#">Le button</Button>)
).toMatchSnapshot();
});
});