zotero/test/tests/supportTest.js
Dan Stillman 260a638dfb Increase resetDB() timeout to 60s, though this seems untenable
Still failing intermittently on Travis at 45s, though other times it
takes 13 seconds.
2015-05-21 23:50:58 -04:00

14 lines
494 B
JavaScript

describe("Support Functions for Unit Testing", function() {
describe("resetDB", function() {
it("should restore the DB to factory settings", function* () {
this.timeout(60000);
yield Zotero.Items.erase(1);
assert.isFalse(yield Zotero.Items.getAsync(1));
yield resetDB();
var item = yield Zotero.Items.getAsync(1);
assert.isObject(item);
yield item.loadItemData();
assert.equal(item.getField("url"), "https://www.zotero.org/support/quick_start_guide");
});
});
});