1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-12 12:47:14 +01:00
metamask-extension/ui/app/pages/send/send-content/send-amount-row/amount-max-button/tests/amount-max-button-utils.test.js
Whymarrh Whitby 9b78d3ab07
Fix import/extensions issues (#9217)
See [`import/extensions`](https://eslint.org/docs/rules/import/extensions) for more information.

This change enables `import/extensions` and fixes the issues raised by the rule.
2020-08-14 09:16:45 -02:30

28 lines
667 B
JavaScript

import assert from 'assert'
import {
calcMaxAmount,
} from '../amount-max-button.utils'
describe('amount-max-button utils', function () {
describe('calcMaxAmount()', function () {
it('should calculate the correct amount when no sendToken defined', function () {
assert.deepEqual(calcMaxAmount({
balance: 'ffffff',
gasTotal: 'ff',
sendToken: false,
}), 'ffff00')
})
it('should calculate the correct amount when a sendToken is defined', function () {
assert.deepEqual(calcMaxAmount({
sendToken: {
decimals: 10,
},
tokenBalance: '64',
}), 'e8d4a51000')
})
})
})