Index: test/subscriptionClasses.js |
diff --git a/test/subscriptionClasses.js b/test/subscriptionClasses.js |
index 16e793350891ef91d28efff6cae5328111792ade..9bc15f0075acae4761914aa06e03a9362a04505c 100644 |
--- a/test/subscriptionClasses.js |
+++ b/test/subscriptionClasses.js |
@@ -17,17 +17,20 @@ |
"use strict"; |
+let {createSandbox} = require("common"); |
+let sandboxedRequire = createSandbox(); |
+ |
let { |
Subscription, SpecialSubscription, DownloadableSubscription, |
RegularSubscription, ExternalSubscription |
-} = require("../lib/subscriptionClasses"); |
+} = sandboxedRequire("subscriptionClasses"); |
function compareSubscription(test, url, expected, postInit) |
{ |
- expected.push("[Subscription]") |
+ expected.push("[Subscription]"); |
let subscription = Subscription.fromURL(url); |
if (postInit) |
- postInit(subscription) |
+ postInit(subscription); |
let result = []; |
subscription.serialize(result); |
test.equal(result.sort().join("\n"), expected.sort().join("\n"), url); |
@@ -74,7 +77,7 @@ exports.testSubscriptionsWithState = function(test) |
subscription.expires = 20; |
subscription.downloadStatus = "foo"; |
subscription.errors = 3; |
- subscription.version = 24 |
+ subscription.version = 24; |
subscription.requiredVersion = "0.6"; |
}); |
compareSubscription(test, "~wl~", ["url=~wl~", "disabled=true", "title=Test group"], function(subscription) |