Skip to content

Commit

Permalink
Tested aedes.Server (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Feb 8, 2020
1 parent c291ea4 commit b3f844c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 1 addition & 2 deletions aedes.js
Expand Up @@ -12,8 +12,7 @@ const bulk = require('bulk-write-stream')
const reusify = require('reusify')
const Client = require('./lib/client')

module.exports = Aedes
Aedes.Server = Aedes
module.exports = Aedes.Server = Aedes

const defaultOptions = {
concurrency: 100,
Expand Down
11 changes: 11 additions & 0 deletions test/basic.js
Expand Up @@ -5,6 +5,17 @@ const eos = require('end-of-stream')
const { setup, connect, subscribe, noError } = require('./helper')
const aedes = require('../')

test('test aedes.Server', function (t) {
t.plan(1)

const broker = new aedes.Server()
t.tearDown(broker.close.bind(broker))

connect(setup(broker), {}, function () {
t.pass('connected')
})
})

test('publish QoS 0', function (t) {
t.plan(2)

Expand Down

0 comments on commit b3f844c

Please sign in to comment.