2020-01-09 04:34:58 +01:00
|
|
|
import assert from 'assert'
|
2020-07-08 23:05:09 +02:00
|
|
|
import { getEtherscanNetworkPrefix } from '../../../ui/lib/etherscan-prefix-for-network'
|
2018-09-24 18:28:04 +02:00
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
describe('Etherscan Network Prefix', function () {
|
2020-07-08 23:05:09 +02:00
|
|
|
it('returns empty string as default value', function () {
|
|
|
|
assert.equal(getEtherscanNetworkPrefix(), '')
|
2018-09-24 18:28:04 +02:00
|
|
|
})
|
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
it('returns empty string as a prefix for networkId of 1', function () {
|
2020-07-08 23:05:09 +02:00
|
|
|
assert.equal(getEtherscanNetworkPrefix('1'), '')
|
2018-09-24 18:28:04 +02:00
|
|
|
})
|
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
it('returns ropsten as prefix for networkId of 3', function () {
|
2020-07-08 23:05:09 +02:00
|
|
|
assert.equal(getEtherscanNetworkPrefix('3'), 'ropsten.')
|
2018-09-24 18:28:04 +02:00
|
|
|
})
|
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
it('returns rinkeby as prefix for networkId of 4', function () {
|
2020-07-08 23:05:09 +02:00
|
|
|
assert.equal(getEtherscanNetworkPrefix('4'), 'rinkeby.')
|
2018-09-24 18:28:04 +02:00
|
|
|
})
|
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
it('returs kovan as prefix for networkId of 42', function () {
|
2020-07-08 23:05:09 +02:00
|
|
|
assert.equal(getEtherscanNetworkPrefix('42'), 'kovan.')
|
2018-09-24 18:28:04 +02:00
|
|
|
})
|
|
|
|
|
2020-02-11 17:51:13 +01:00
|
|
|
it('returs goerli as prefix for networkId of 5', function () {
|
2020-07-08 23:05:09 +02:00
|
|
|
assert.equal(getEtherscanNetworkPrefix('5'), 'goerli.')
|
2019-04-17 19:34:49 +02:00
|
|
|
})
|
2018-09-24 18:28:04 +02:00
|
|
|
})
|