Commit 3afc0e58 authored by JC Brand's avatar JC Brand

Bugfixes to make profiling work again.

parent 34630693
......@@ -9,6 +9,7 @@
);
} (this, function ($, mock, test_utils) {
var Strophe = converse_api.env.Strophe;
var $iq = converse_api.env.$iq;
describe("Profiling", function() {
beforeEach(function() {
......@@ -19,7 +20,6 @@
xit("adds hundreds of contacts to the roster", $.proxy(function() {
converse.roster_groups = false;
spyOn(this.roster, 'clearCache').andCallThrough();
expect(this.roster.pluck('jid').length).toBe(0);
var stanza = $iq({
to: this.connection.jid,
......@@ -30,7 +30,7 @@
});
_.each(['Friends', 'Colleagues', 'Family', 'Acquaintances'], function (group) {
var i;
for (i=0; i<100; i++) {
for (i=0; i<50; i++) {
stanza = stanza.c('item', {
jid: Math.random().toString().replace('0.', '')+'@example.net',
subscription:'both'
......@@ -38,14 +38,12 @@
}
});
this.roster.onReceivedFromServer(stanza.tree());
expect(this.roster.clearCache).toHaveBeenCalled();
expect(this.roster.pluck('jid').length).toBe(400);
// expect(this.roster.pluck('jid').length).toBe(400);
}, converse));
xit("adds hundreds of contacts to the roster, with roster groups", $.proxy(function() {
// converse.show_only_online_users = true;
converse.roster_groups = true;
spyOn(this.roster, 'clearCache').andCallThrough();
expect(this.roster.pluck('jid').length).toBe(0);
var stanza = $iq({
to: this.connection.jid,
......@@ -64,11 +62,7 @@
}
});
this.roster.onReceivedFromServer(stanza.tree());
expect(this.roster.clearCache).toHaveBeenCalled();
//expect(this.roster.pluck('jid').length).toBe(400);
}, converse));
it("contacts in a very large roster change their statuses", $.proxy(function() {
}, converse));
});
}));
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