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

29 lines
965 B
JavaScript
Raw Normal View History

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