Skip to content

Commit 98638f1

Browse files
committed
adding spec for mqttMaxListener attribute
1 parent ce58915 commit 98638f1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

test/mqtt-connection-spec.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
// Setp 2: get the element
4343
var mqttElement;
4444
var mqttDisabledAuto;
45+
var mqttMaxListeners;
4546

4647
suite('<mqtt-connection>', function () {
4748

@@ -77,7 +78,6 @@
7778
assert.isTrue(mqttElement.auto);
7879
});
7980

80-
8181
test('mqtt-connection.auto is false', function () {
8282
assert.isBoolean(mqttElement.auto, 'mqtt-connection.auto should be a boolean');
8383
assert.isTrue(mqttElement.auto);
@@ -146,6 +146,19 @@
146146
});
147147
});
148148

149+
suite('mqtt-conntection-with-increased-max-listeners', function(){
150+
setup(function () {
151+
mqttMaxListeners = fixture('MaxListeners');
152+
});
153+
154+
test('mqtt-connection#maxListeners is number', function () {
155+
assert.isNumber(mqttMaxListeners.maxListeners, 'mqtt-connection.maxListeners should be a number');
156+
assert.strictEqual(mqttMaxListeners.options.maxListeners, 15);
157+
mqttMaxListeners.maxListeners = 30;
158+
assert.strictEqual(mqttMaxListeners.options.maxListeners, 30);
159+
});
160+
});
161+
149162
});
150163
</script>
151164

0 commit comments

Comments
 (0)