Refactor: db tasks to database.js, log delete to modules/logs.js
This commit is contained in:
parent
3527740598
commit
26c273618a
10 changed files with 196 additions and 191 deletions
|
@ -1,37 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
describe('Backup', function() {
|
||||
describe('handleDOMException', function() {
|
||||
it('handles null, still calls reject', function() {
|
||||
var called = 0;
|
||||
var reject = function() {
|
||||
called += 1;
|
||||
};
|
||||
var error = null;
|
||||
var prefix = 'something';
|
||||
|
||||
Whisper.Backup.handleDOMException(prefix, error, reject);
|
||||
|
||||
assert.strictEqual(called, 1);
|
||||
});
|
||||
|
||||
it('handles object code and message', function() {
|
||||
var called = 0;
|
||||
var reject = function() {
|
||||
called += 1;
|
||||
};
|
||||
var error = {
|
||||
code: 4,
|
||||
message: 'some cryptic error',
|
||||
};
|
||||
var prefix = 'something';
|
||||
|
||||
Whisper.Backup.handleDOMException(prefix, error, reject);
|
||||
|
||||
assert.strictEqual(called, 1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('sanitizeFileName', function() {
|
||||
it('leaves a basic string alone', function() {
|
||||
var initial = 'Hello, how are you #5 (\'fine\' + great).jpg';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue