You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
588 B
30 lines
588 B
import React from 'react'
|
|
import { Dropdown } from 'components/UI'
|
|
import renderer from 'react-test-renderer'
|
|
import { dark } from 'themes'
|
|
|
|
const currencies = [
|
|
{
|
|
key: 'btc',
|
|
name: 'BTC'
|
|
},
|
|
{
|
|
key: 'bits',
|
|
name: 'bits'
|
|
},
|
|
{
|
|
key: 'sats',
|
|
name: 'satoshis'
|
|
}
|
|
]
|
|
|
|
const setCurrency = jest.fn()
|
|
|
|
describe('component.Dropdown', () => {
|
|
it('should render correctly', () => {
|
|
const tree = renderer
|
|
.create(<Dropdown theme={dark} activeKey="btc" items={currencies} onClick={setCurrency} />)
|
|
.toJSON()
|
|
expect(tree).toMatchSnapshot()
|
|
})
|
|
})
|
|
|