Remove trailing whitespace

This commit is contained in:
JC Brand 2013-07-25 09:45:35 +02:00
parent 1c95e473f9
commit 18565e7977
2 changed files with 21 additions and 21 deletions

14
mock.js
View File

@ -1,8 +1,8 @@
(function (root, factory) {
define("mock",
['converse'],
function() {
return factory();
define("mock",
['converse'],
function() {
return factory();
});
}(this, function (converse) {
var mock_connection = {
@ -14,7 +14,7 @@
'rooms': {}
},
'jid': 'dummy@localhost',
'addHandler': function (handler, ns, name, type, id, from, options) {
'addHandler': function (handler, ns, name, type, id, from, options) {
return function () {};
},
'send': function () {},
@ -26,7 +26,7 @@
'subscribe': function () {},
'registerCallback': function () {}
},
'vcard': {
'vcard': {
'get': function (callback, jid) {
var firstname, lastname;
if (!jid) {
@ -41,7 +41,7 @@
var fullname = firstname+' '+lastname;
var vcard = $iq().c('vCard').c('FN').t(fullname);
callback(vcard.tree());
}
}
},
'disco': {
'info': function () {},

View File

@ -54,7 +54,7 @@
expect($("div#controlbox").is(':visible')).toBe(true);
}, converse);
it("can be opened by clicking a DOM element with class 'toggle-online-users'", open_controlbox);
describe("The Status Widget", $.proxy(function () {
it("can be used to set the current user's chat status", $.proxy(function () {
var view = this.xmppstatusview;
@ -121,7 +121,7 @@
var i, t, is_last;
spyOn(this.rosterview, 'render').andCallThrough();
for (i=0; i<pend_names.length; i++) {
is_last = i==(pend_names.length-1);
is_last = i===(pend_names.length-1);
this.roster.create({
jid: pend_names[i].replace(' ','.').toLowerCase() + '@localhost',
subscription: 'none',
@ -129,7 +129,7 @@
fullname: pend_names[i],
is_last: is_last
});
// For performance reasons, the roster should only be shown once
// For performance reasons, the roster should only be shown once
// the last contact has been added.
if (is_last) {
expect(this.rosterview.$el.is(':visible')).toEqual(true);
@ -162,7 +162,7 @@
subscription: 'both',
ask: null,
fullname: cur_names[i],
is_last: i==(cur_names.length-1)
is_last: i===(cur_names.length-1)
});
expect(this.rosterview.render).toHaveBeenCalled();
// Check that they are sorted alphabetically
@ -291,7 +291,7 @@
subscription: 'none',
ask: 'request',
fullname: req_names[i],
is_last: i==(req_names.length-1)
is_last: i===(req_names.length-1)
});
expect(this.rosterview.render).toHaveBeenCalled();
// Check that they are sorted alphabetically
@ -335,7 +335,7 @@
expect(this.rosterview.removeRosterItem).toHaveBeenCalled();
expect(this.connection.roster.unauthorize).toHaveBeenCalled();
// There should now be one less contact
expect(this.roster.length).toEqual(num_contacts-1);
expect(this.roster.length).toEqual(num_contacts-1);
}, converse));
}, converse));
@ -368,7 +368,7 @@
afterEach($.proxy(function () {
// Contacts retrieved from localStorage have chat_status of
// "offline".
// "offline".
// In the next test suite, we need some online contacts, so
// we make some online now
for (i=0; i<5; i++) {
@ -456,7 +456,7 @@
expect(newchatboxes.length).toEqual(0);
// Lets open the controlbox again, purely for visual feedback
open_controlbox();
open_controlbox();
}, converse));
describe("A Chat Message", $.proxy(function () {
@ -465,8 +465,8 @@
var sender_jid = cur_names[0].replace(' ','.').toLowerCase() + '@localhost';
msg = $msg({
from: sender_jid,
to: this.connection.jid,
type: 'chat',
to: this.connection.jid,
type: 'chat',
id: (new Date()).getTime()
}).c('body').t(message).up()
.c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree();
@ -534,8 +534,8 @@
var sender_jid = cur_names[0].replace(' ','.').toLowerCase() + '@localhost';
msg = $msg({
from: sender_jid,
to: this.connection.jid,
type: 'chat',
to: this.connection.jid,
type: 'chat',
id: (new Date()).getTime()
}).c('body').t(message).up()
.c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree();
@ -563,8 +563,8 @@
var sender_jid = cur_names[0].replace(' ','.').toLowerCase() + '@localhost';
msg = $msg({
from: sender_jid,
to: this.connection.jid,
type: 'chat',
to: this.connection.jid,
type: 'chat',
id: (new Date()).getTime()
}).c('body').t(message).up()
.c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'}).tree();