1
0
mirror of https://github.com/fluencelabs/js-libp2p-interfaces synced 2025-05-08 03:02:20 +00:00

33 lines
734 B
JavaScript
Raw Normal View History

2019-09-26 11:27:39 +02:00
/* eslint-env mocha */
'use strict'
module.exports = (common) => {
describe('interface-peer-discovery', () => {
let discovery
before(() => {
discovery = common.setup()
})
after(() => common.teardown && common.teardown())
it('can start the service', async () => {
await discovery.start()
})
it('can start and stop the service', async () => {
await discovery.start()
await discovery.stop()
})
it('should not fail to stop the service if it was not started', async () => {
await discovery.stop()
})
it('should not fail to start the service if it is already started', async () => {
await discovery.start()
await discovery.start()
})
})
}