1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/test/unit/ui/etherscan-prefix-for-network.spec.js

31 lines
916 B
JavaScript
Raw Normal View History

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