Test fixes after 5bceebf56c

This commit is contained in:
Dan Stillman 2016-11-29 03:52:07 -05:00
parent 8799bb4ebd
commit 8f0ed56ae2
5 changed files with 11 additions and 12 deletions

View file

@ -198,6 +198,7 @@ mocha.setup({
before(function () {
// Store all prefs set in runtests.sh
Components.utils.import("resource://zotero/config.js");
var prefBranch = Services.prefs.getBranch(ZOTERO_CONFIG.PREF_BRANCH);
ZoteroUnit.customPrefs = {};
prefBranch.getChildList("", {})
@ -209,6 +210,7 @@ before(function () {
* Clear all prefs, and reset those set in runtests.sh to original values
*/
function resetPrefs() {
Components.utils.import("resource://zotero/config.js");
var prefBranch = Services.prefs.getBranch(ZOTERO_CONFIG.PREF_BRANCH);
prefBranch.getChildList("", {}).forEach(key => {
var origVal = ZoteroUnit.customPrefs[key];