A Metamask fork with Infura removed and default networks editable
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.
ciphermask/ui/app/components/user-preferenced-currency-d.../tests/user-preferenced-currency-d...

35 lines
1.1 KiB

import React from 'react'
import assert from 'assert'
import { shallow } from 'enzyme'
import UserPreferencedCurrencyDisplay from '../user-preferenced-currency-display.component'
import CurrencyDisplay from '../../currency-display'
describe('UserPreferencedCurrencyDisplay Component', () => {
describe('rendering', () => {
it('should render properly', () => {
const wrapper = shallow(
<UserPreferencedCurrencyDisplay />
)
assert.ok(wrapper)
assert.equal(wrapper.find(CurrencyDisplay).length, 1)
})
it('should pass all props to the CurrencyDisplay child component', () => {
const wrapper = shallow(
<UserPreferencedCurrencyDisplay
prop1={true}
prop2="test"
prop3={1}
/>
)
assert.ok(wrapper)
assert.equal(wrapper.find(CurrencyDisplay).length, 1)
assert.equal(wrapper.find(CurrencyDisplay).props().prop1, true)
assert.equal(wrapper.find(CurrencyDisplay).props().prop2, 'test')
assert.equal(wrapper.find(CurrencyDisplay).props().prop3, 1)
})
})
})