mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
92971d3c87
* Update eslint-plugin-import version * Convert JS files to use ESM * Update ESLint rules to check imports * Fix test:unit:global command env * Cleanup mock-dev script
31 lines
874 B
JavaScript
31 lines
874 B
JavaScript
import assert from 'assert'
|
|
import etherscanNetworkPrefix from '../../../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.')
|
|
})
|
|
|
|
it('returs goerli as prefix for networkId of 5', () => {
|
|
assert.equal(etherscanNetworkPrefix(5), 'goerli.')
|
|
})
|
|
|
|
})
|