35 lines
817 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
2019-09-27 13:32:45 +02:00
before(async () => {
discovery = await common.setup()
2019-09-26 11:27:39 +02:00
})
after(() => common.teardown && common.teardown())
2019-09-27 13:32:45 +02:00
afterEach('ensure discovery was stopped', () => discovery.stop())
2019-09-26 11:27:39 +02:00
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()
})
})
}