2019-02-19 06:36:12 +01:00
|
|
|
import assert from 'assert'
|
|
|
|
import { getMethodName } from '../confirm-transaction-base.component'
|
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
describe('ConfirmTransactionBase Component', function () {
|
|
|
|
describe('getMethodName', function () {
|
|
|
|
it('should get correct method names', function () {
|
2019-02-19 06:36:12 +01:00
|
|
|
assert.equal(getMethodName(undefined), '')
|
|
|
|
assert.equal(getMethodName({}), '')
|
|
|
|
assert.equal(getMethodName('confirm'), 'confirm')
|
|
|
|
assert.equal(getMethodName('balanceOf'), 'balance Of')
|
2020-11-03 00:41:28 +01:00
|
|
|
assert.equal(
|
|
|
|
getMethodName('ethToTokenSwapInput'),
|
|
|
|
'eth To Token Swap Input',
|
|
|
|
)
|
2019-02-19 06:36:12 +01:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|