File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 4242 // Setp 2: get the element
4343 var mqttElement ;
4444 var mqttDisabledAuto ;
45+ var mqttMaxListeners ;
4546
4647 suite ( '<mqtt-connection>' , function ( ) {
4748
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 ) ;
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
You can’t perform that action at this time.
0 commit comments