1 | import React from 'react'
|
2 | import { css } from 'styled-components'
|
3 | import 'jest-styled-components'
|
4 |
|
5 | import { theme } from 'SRC/core/theme'
|
6 | import Color, { colors } from './colors'
|
7 |
|
8 | const { shallowWithTheme } = global
|
9 |
|
10 | describe('(Styled Component) Color', () => {
|
11 | const createColor = (props) => {
|
12 | return shallowWithTheme(<Color {...props} />)
|
13 | }
|
14 |
|
15 | test('matching the snapshot', () => {
|
16 | expect(createColor())
|
17 | .toMatchSnapshot()
|
18 | })
|
19 |
|
20 | test('Setting the color', () => {
|
21 | expect(createColor({color: theme.colors.rocketBlue}))
|
22 | .toHaveStyleRule({
|
23 | 'background-color': theme.colors.rocketBlue
|
24 | })
|
25 | })
|
26 | })
|
27 |
|
28 | describe('(Object) colors', () => {
|
29 | test('matching the snapshot', () => {
|
30 | expect(colors)
|
31 | .toMatchSnapshot()
|
32 | })
|
33 | })
|
34 |
|
\ | No newline at end of file |