mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-03-19 09:00:52 +00:00
20 lines
432 B
JavaScript
20 lines
432 B
JavaScript
|
/* eslint-env mocha */
|
||
|
'use strict'
|
||
|
|
||
|
const expect = require('chai').expect
|
||
|
const Swarm = require('libp2p-swarm')
|
||
|
const Id = require('peer-id')
|
||
|
const Peer = require('peer-info')
|
||
|
|
||
|
const Node = require('../src')
|
||
|
|
||
|
describe('libp2p', () => {
|
||
|
it('can be instantiated', () => {
|
||
|
const peer = new Peer(Id.create(), [])
|
||
|
const swarm = new Swarm(peer)
|
||
|
const node = new Node(swarm)
|
||
|
|
||
|
expect(node.swarm).to.be.eql(swarm)
|
||
|
})
|
||
|
})
|