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/send/send-content/send-gas-row/tests/send-gas-row-selectors.test.js

49 lines
982 B

import assert from 'assert'
import {
gasFeeIsInError,
getGasLoadingError,
} from '../send-gas-row.selectors.js'
describe('send-gas-row selectors', () => {
describe('getGasLoadingError()', () => {
it('should return send.errors.gasLoading', () => {
const state = {
send: {
errors: {
gasLoading: 'abc',
},
},
}
assert.equal(getGasLoadingError(state), 'abc')
})
})
describe('gasFeeIsInError()', () => {
it('should return true if send.errors.gasFee is truthy', () => {
const state = {
send: {
errors: {
gasFee: 'def',
},
},
}
assert.equal(gasFeeIsInError(state), true)
})
it('should return false send.errors.gasFee is falsely', () => {
const state = {
send: {
errors: {
gasFee: null,
},
},
}
assert.equal(gasFeeIsInError(state), false)
})
})
})