mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-02 15:31:04 +00:00
* feat: topology * feat: multicodec-topology * chore: address review Co-Authored-By: Jacob Heun <jacobheun@gmail.com> * chore: remove error from disconnect * docs: topology * chore: apply suggestions from code review Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
27 lines
516 B
JavaScript
27 lines
516 B
JavaScript
/* eslint-env mocha */
|
|
'use strict'
|
|
|
|
const tests = require('../../src/topology/tests/topology')
|
|
const Topology = require('../../src/topology')
|
|
|
|
describe('topology compliance tests', () => {
|
|
tests({
|
|
setup (properties) {
|
|
const handlers = {
|
|
onConnect: () => { },
|
|
onDisconnect: () => { }
|
|
}
|
|
|
|
const topology = new Topology({
|
|
handlers,
|
|
...properties
|
|
})
|
|
|
|
return topology
|
|
},
|
|
teardown () {
|
|
// cleanup resources created by setup()
|
|
}
|
|
})
|
|
})
|