| Index: test/filterStorage_readwrite.js |
| =================================================================== |
| --- a/test/filterStorage_readwrite.js |
| +++ b/test/filterStorage_readwrite.js |
| @@ -178,16 +178,39 @@ |
| for (let line of lines) |
| importer(line); |
| importer(null); |
| test.equal(filterStorage.fileProperties.version, filterStorage.formatVersion, "File format version"); |
| let exported = Array.from(filterStorage.exportData()); |
| test.deepEqual(canonize(exported), canonize(lines), "Import/export result"); |
| + |
| + // Make sure the relationships between filters and subscriptions are set |
| + // up. |
| + for (let subscription of filterStorage.subscriptions()) |
| + { |
| + for (let text of subscription.filterText()) |
| + { |
| + let found = false; |
| + |
| + for (let filterSubscription of Filter.fromText(text).subscriptions()) |
| + { |
| + if (filterSubscription == subscription) |
| + { |
| + found = true; |
| + break; |
| + } |
| + } |
| + |
| + test.ok(found, "Filter " + JSON.stringify(text) + " " + |
| + "should be linked to its subscription " + |
| + subscription.url); |
|
hub
2019/02/22 15:28:04
I think using a template string here would be clea
Manish Jethani
2019/02/22 15:48:38
Done.
|
| + } |
| + } |
| } |
| catch (error) |
| { |
| unexpectedError.call(test, error); |
| } |
| test.done(); |
| }; |