Skip to content

Commit a59992b

Browse files
committed
Fix test not ending properly
1 parent 8543bea commit a59992b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict'
2+
13
const Server = require('mqtt/test/server');
24

35
const AsyncMQTT = require('./');
@@ -19,7 +21,10 @@ function runTests () {
1921
const client = AsyncMQTT.connect(SERVER_URL);
2022

2123
t.ok(client instanceof AsyncClient, 'Connect returned an AsyncClient');
22-
client.end();
24+
25+
client.on('connect', () => {
26+
client.end();
27+
})
2328
});
2429

2530
test('Should be able to listen on event on client', t => {

0 commit comments

Comments
 (0)