Commit f785c2df authored by JC Brand's avatar JC Brand

Fix linting errors

parent a19e7aef
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
* </query> * </query>
* </iq> * </iq>
*/ */
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]'); return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]');
})[0]; });
var info_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var info_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
stanza = $iq({ stanza = $iq({
'type': 'result', 'type': 'result',
...@@ -128,9 +128,9 @@ ...@@ -128,9 +128,9 @@
* </query> * </query>
* </iq> * </iq>
*/ */
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#items"]'); return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#items"]');
})[0]; });
var items_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var items_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
stanza = $iq({ stanza = $iq({
'type': 'result', 'type': 'result',
......
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
* </query> * </query>
* </iq> * </iq>
*/ */
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector( return iq.nodeTree.querySelector(
'iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]'); 'iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]');
})[0]; });
var info_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var info_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
stanza = $iq({ stanza = $iq({
...@@ -88,9 +88,9 @@ ...@@ -88,9 +88,9 @@
* </query> * </query>
* </iq> * </iq>
*/ */
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#items"]'); return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#items"]');
})[0]; });
var items_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var items_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
stanza = $iq({ stanza = $iq({
'type': 'result', 'type': 'result',
...@@ -115,9 +115,9 @@ ...@@ -115,9 +115,9 @@
}, 300); }, 300);
}); });
}).then(function () { }).then(function () {
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector('iq[to="upload.localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]'); return iq.nodeTree.querySelector('iq[to="upload.localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]');
})[0]; });
var IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
expect(stanza.toLocaleString()).toBe( expect(stanza.toLocaleString()).toBe(
"<iq from='dummy@localhost/resource' to='upload.localhost' type='get' xmlns='jabber:client' id='"+IQ_id+"'>"+ "<iq from='dummy@localhost/resource' to='upload.localhost' type='get' xmlns='jabber:client' id='"+IQ_id+"'>"+
...@@ -323,10 +323,10 @@ ...@@ -323,10 +323,10 @@
'iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]'); 'iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]');
}).length > 0; }).length > 0;
}, 300).then(function () { }, 300).then(function () {
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector( return iq.nodeTree.querySelector(
'iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]'); 'iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]');
})[0]; });
var info_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var info_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
stanza = $iq({ stanza = $iq({
...@@ -361,9 +361,9 @@ ...@@ -361,9 +361,9 @@
}, 300); }, 300);
}); });
}).then(function () { }).then(function () {
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#items"]'); return iq.nodeTree.querySelector('iq[to="localhost"] query[xmlns="http://jabber.org/protocol/disco#items"]');
})[0]; });
var items_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var items_IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
stanza = $iq({ stanza = $iq({
'type': 'result', 'type': 'result',
...@@ -388,9 +388,9 @@ ...@@ -388,9 +388,9 @@
}, 300); }, 300);
}); });
}).then(function () { }).then(function () {
var stanza = _.filter(IQ_stanzas, function (iq) { var stanza = _.find(IQ_stanzas, function (iq) {
return iq.nodeTree.querySelector('iq[to="upload.localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]'); return iq.nodeTree.querySelector('iq[to="upload.localhost"] query[xmlns="http://jabber.org/protocol/disco#info"]');
})[0]; });
var IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)]; var IQ_id = IQ_ids[IQ_stanzas.indexOf(stanza)];
expect(stanza.toLocaleString()).toBe( expect(stanza.toLocaleString()).toBe(
"<iq from='dummy@localhost/resource' to='upload.localhost' type='get' xmlns='jabber:client' id='"+IQ_id+"'>"+ "<iq from='dummy@localhost/resource' to='upload.localhost' type='get' xmlns='jabber:client' id='"+IQ_id+"'>"+
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment