1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 08:09:15 +01:00
metamask-extension/test/unit/ui/etherscan-prefix-for-network.spec.js

31 lines
884 B
JavaScript
Raw Normal View History

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