mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-04 22:01:22 +00:00
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()
|
||
|
}
|
||
|
})
|
||
|
})
|