mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 12:56:01 +01:00
4f3fc95d50
* Use @metamask/eslint-config@1.1.0 * Use eslint-plugin-mocha@6.2.2 * Mark root ESLint config as root * Update Mocha ESLint rules with shared ESLint config
29 lines
715 B
JavaScript
29 lines
715 B
JavaScript
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', function () {
|
|
it('selects token info from tokens based on selectedTokenAddress in state', function () {
|
|
const tokenInfo = selectedTokenSelector(state)
|
|
assert.equal(tokenInfo, metaToken)
|
|
})
|
|
})
|