Skip to content

Commit

Permalink
test: test for dns4 and dns6 specifically
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jan 22, 2017
1 parent ddaaf98 commit 52652f1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/index.spec.js
Expand Up @@ -530,12 +530,24 @@ describe('helpers', () => {

describe('resolvable multiaddrs', () => {
describe('.isName', () => {
it('valid name', () => {
it('valid name dns', () => {
const str = '/dns/ipfs.io'
const addr = multiaddr(str)
expect(multiaddr.isName(addr)).to.be.true
})

it('valid name dns4', () => {
const str = '/dns4/ipfs.io'
const addr = multiaddr(str)
expect(multiaddr.isName(addr)).to.be.true
})

it('valid name dns6', () => {
const str = '/dns6/ipfs.io'
const addr = multiaddr(str)
expect(multiaddr.isName(addr)).to.be.true
})

it('invalid name', () => {
const str = '/ip4/127.0.0.1'
const addr = multiaddr(str)
Expand Down

0 comments on commit 52652f1

Please sign in to comment.