aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/ui/etherscan-prefix-for-network.spec.js
blob: f0aeb8306ae0e66b9cb532f7817954f7c9cc4379 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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.')
  })

})