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.
29 lines
703 B
29 lines
703 B
5 years ago
|
import assert from 'assert'
|
||
|
import { selectedTokenSelector } from '../tokens'
|
||
|
|
||
|
const metaToken = {
|
||
|
'address': '0x617b3f8050a0bd94b6b1da02b4384ee5b4df13f4',
|
||
|
'symbol': 'META',
|
||
|
'decimals': 18,
|
||
|
}
|
||
|
|
||
|
const state = {
|
||
|
metamask: {
|
||
|
selectedTokenAddress: '0x617b3f8050a0bd94b6b1da02b4384ee5b4df13f4',
|
||
|
tokens: [
|
||
|
{
|
||
|
'address': '0x06012c8cf97bead5deae237070f9587f8e7a266d',
|
||
|
'symbol': 'CK',
|
||
|
'decimals': 0,
|
||
|
},
|
||
|
metaToken,
|
||
|
],
|
||
|
},
|
||
|
}
|
||
|
describe('Selected Token Selector', () => {
|
||
|
it('selects token info from tokens based on selectedTokenAddress in state', () => {
|
||
|
const tokenInfo = selectedTokenSelector(state)
|
||
|
assert.equal(tokenInfo, metaToken)
|
||
|
})
|
||
|
})
|