1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-22 08:52:15 -05:00

do not use synchronous JSON.parse for potentially large objects

This commit is contained in:
Felix Hammerl 2014-02-24 18:19:12 +01:00
parent dc59febb8d
commit b13b077624

View File

@ -1028,13 +1028,10 @@ define(function(require) {
uid: uid
}).yieldsAsync(null, [message]);
localStoreStub = sinon.stub(dao, '_localStoreMessages').withArgs(sinon.match(function(o){
expect(o.folder).to.equal(folder);
expect(o.emails[0].uid).to.equal(uid);
expect(o.emails[0].body).to.equal(body);
return true;
})).yieldsAsync();
localStoreStub = sinon.stub(dao, '_localStoreMessages').withArgs({
folder: folder,
emails: [message]
}).yieldsAsync();
imapStreamStub = sinon.stub(dao, '_imapStreamText', function(opts, cb) {
expect(opts).to.deep.equal({
@ -1082,13 +1079,10 @@ define(function(require) {
uid: uid
}).yieldsAsync(null, [message]);
localStoreStub = sinon.stub(dao, '_localStoreMessages').withArgs(sinon.match(function(o){
expect(o.folder).to.equal(folder);
expect(o.emails[0].uid).to.equal(uid);
expect(o.emails[0].body).to.equal(body);
return true;
})).yieldsAsync();
localStoreStub = sinon.stub(dao, '_localStoreMessages').withArgs({
folder: folder,
emails: [message]
}).yieldsAsync();
imapStreamStub = sinon.stub(dao, '_imapStreamText', function(opts, cb) {
expect(opts).to.deep.equal({