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 () {
|
2020-12-03 16:46:22 +01:00
|
|
|
assert.strictEqual(getMethodName(undefined), '')
|
|
|
|
assert.strictEqual(getMethodName({}), '')
|
|
|
|
assert.strictEqual(getMethodName('confirm'), 'confirm')
|
|
|
|
assert.strictEqual(getMethodName('balanceOf'), 'balance Of')
|
|
|
|
assert.strictEqual(
|
2020-11-03 00:41:28 +01:00
|
|
|
getMethodName('ethToTokenSwapInput'),
|
|
|
|
'eth To Token Swap Input',
|
|
|
|
)
|
2019-02-19 06:36:12 +01:00
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|