OLD | NEW |
1 "use strict"; | 1 "use strict"; |
2 | 2 |
3 { | 3 { |
4 const {Prefs} = require("prefs"); | 4 const {Prefs} = require("../../lib/prefs"); |
5 | 5 |
6 QUnit.module("Preferences", { | 6 QUnit.module("Preferences", { |
7 setup() | 7 setup() |
8 { | 8 { |
9 this._pbackup = Object.create(null); | 9 this._pbackup = Object.create(null); |
10 for (let pref in Prefs) | 10 for (let pref in Prefs) |
11 { | 11 { |
12 let value = Prefs[pref]; | 12 let value = Prefs[pref]; |
13 this._pbackup[pref] = value; | 13 this._pbackup[pref] = value; |
14 } | 14 } |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 delete Prefs.notificationdata.foo; | 153 delete Prefs.notificationdata.foo; |
154 delete Prefs.notificationdata.bar; | 154 delete Prefs.notificationdata.bar; |
155 Prefs.notificationdata = JSON.parse(JSON.stringify(Prefs.notificationdata)); | 155 Prefs.notificationdata = JSON.parse(JSON.stringify(Prefs.notificationdata)); |
156 deepEqual( | 156 deepEqual( |
157 Prefs.notificationdata, {}, | 157 Prefs.notificationdata, {}, |
158 "Prefs object returns the correct value after setting pref to " + | 158 "Prefs object returns the correct value after setting pref to " + |
159 "default value" | 159 "default value" |
160 ); | 160 ); |
161 }); | 161 }); |
162 } | 162 } |
OLD | NEW |