Index: qunit/tests/prefs.js |
diff --git a/qunit/tests/prefs.js b/qunit/tests/prefs.js |
index f620ca9a555056d0a53856fb805a0cc64120011a..9755e743461e55e10c9b3c2985a2698c4ad556dd 100644 |
--- a/qunit/tests/prefs.js |
+++ b/qunit/tests/prefs.js |
@@ -1,4 +1,3 @@ |
-(function() |
{ |
module("Preferences", |
{ |
@@ -17,7 +16,7 @@ |
{ |
let done = assert.async(); |
let key = "pref:" + name; |
- chrome.storage.local.get(key, function(items) |
+ chrome.storage.local.get(key, items => |
{ |
equal(key in items, expectedValue, description); |
done(); |
@@ -28,14 +27,14 @@ |
{ |
let done = assert.async(); |
let key = "pref:" + name; |
- chrome.storage.local.get(key, function(items) |
+ chrome.storage.local.get(key, items => |
{ |
deepEqual(items[key], expectedValue, description); |
done(); |
}); |
} |
- test("Numerical pref", function(assert) |
+ test("Numerical pref", assert => |
{ |
Prefs.patternsbackups = 5; |
equal(Prefs.patternsbackups, 5, "Prefs object returns the correct value after setting pref to default value"); |
@@ -46,7 +45,7 @@ |
checkPref("patternsbackups", 12, "Value has been written", assert); |
}); |
- test("Boolean pref", function(assert) |
+ test("Boolean pref", assert => |
{ |
Prefs.enabled = true; |
equal(Prefs.enabled, true, "Prefs object returns the correct value after setting pref to default value"); |
@@ -57,7 +56,7 @@ |
checkPref("enabled", false, "Value has been written", assert); |
}); |
- test("String pref", function(assert) |
+ test("String pref", assert => |
{ |
let defaultValue = "https://notification.adblockplus.org/notification.json"; |
Prefs.notificationurl = defaultValue; |
@@ -71,7 +70,7 @@ |
checkPref("notificationurl", newValue, "Value has been written", assert); |
}); |
- test("Object pref (complete replacement)", function(assert) |
+ test("Object pref (complete replacement)", assert => |
{ |
Prefs.notificationdata = {}; |
deepEqual(Prefs.notificationdata, {}, "Prefs object returns the correct value after setting pref to default value"); |
@@ -83,7 +82,7 @@ |
checkPref("notificationdata", newValue, "Value has been written", assert); |
}); |
- test("Property-wise modification", function(assert) |
+ test("Property-wise modification", assert => |
{ |
Prefs.notificationdata = {}; |
@@ -99,4 +98,4 @@ |
Prefs.notificationdata = JSON.parse(JSON.stringify(Prefs.notificationdata)); |
deepEqual(Prefs.notificationdata, {}, "Prefs object returns the correct value after setting pref to default value"); |
}); |
-})(); |
+} |