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
32 lines (30 loc) · 917 Bytes
/
index.test.tsx
File metadata and controls
32 lines (30 loc) · 917 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
31
32
import 'jest-styled-components';
import React from 'react';
import mountWithTheme from '../../test/themeMount';
import CustomTemplate from '.';
import { sandbox } from '../SandboxCard/fixtures';
const template = (props = null) => ({
id: '2321',
color: '#fff',
sandbox: sandbox(props),
});
describe('<ContributorsBadge /> rendering', () => {
it('Default', () =>
expect(
mountWithTheme(<CustomTemplate template={template()} />)
).toMatchSnapshot());
it('No Title', () =>
expect(
mountWithTheme(<CustomTemplate template={template({ title: null })} />)
).toMatchSnapshot());
it('No Description', () =>
expect(
mountWithTheme(
<CustomTemplate template={template({ description: null })} />
)
).toMatchSnapshot());
it('No Tags', () =>
expect(
mountWithTheme(<CustomTemplate template={template({ tags: [] })} />)
).toMatchSnapshot());
});