aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/settings_test.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit_tests/settings_test.coffee b/tests/unit_tests/settings_test.coffee
index 946a1688..ded7b5f8 100644
--- a/tests/unit_tests/settings_test.coffee
+++ b/tests/unit_tests/settings_test.coffee
@@ -3,6 +3,8 @@ extend global, require "./test_chrome_stubs.js"
extend(global, require "../../lib/utils.js")
Utils.getCurrentVersion = -> '1.44'
+Utils.isBackgroundPage = -> true
+Utils.isExtensionPage = -> true
global.localStorage = {}
extend(global,require "../../lib/settings.js")
@@ -10,6 +12,7 @@ context "settings",
setup ->
stub global, 'localStorage', {}
+ Settings.cache = global.localStorage # Point the settings cache to the new localStorage object.
Settings.postUpdateHooks = {} # Avoid running update hooks which include calls to outside of settings.
Settings.init()