Eliminate all console errors during test run

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-05-18 10:42:20 -07:00
parent f6c62e4822
commit 3cfac58d78
5 changed files with 38 additions and 16 deletions

View file

@ -91,9 +91,21 @@ describe("SignalProtocolStore", function() {
});
});
describe('removePreKey', function() {
var oldGetAccountManager;
before(function(done) {
oldGetAccountManager = window.getAccountManager;
window.getAccountManager = function() {
return {
refreshPreKeys: function() {
return Promise.resolve();
}
};
};
store.storePreKey(2, testKey).then(done);
});
after(function() {
window.getAccountManager = oldGetAccountManager;
});
it('deletes prekeys', function(done) {
store.removePreKey(2, testKey).then(function() {
return store.loadPreKey(2).then(function(key) {