Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: test/filterStorage.js

Issue 29616611: Issue 6090 - Allow use of console to be seen during tests (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: review feedback Created Nov. 24, 2017, 6:16 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« test/_common.js ('K') | « test/_common.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/filterStorage.js
===================================================================
--- a/test/filterStorage.js
+++ b/test/filterStorage.js
@@ -12,17 +12,17 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
-const {createSandbox} = require("./_common");
+const {createSandbox, silenceAssertionOutput} = require("./_common");
let Filter = null;
let FilterNotifier = null;
let FilterStorage = null;
let Subscription = null;
exports.setUp = function(callback)
{
@@ -179,17 +179,20 @@
compareSubscriptionList(test, "Remove", [subscription3, subscription1]);
changes = [];
test.ok(FilterStorage.moveSubscription(subscription3, subscription2), "Move before removed subscription succeeded");
compareSubscriptionList(test, "Move before removed subscription", [subscription1, subscription3]);
test.deepEqual(changes, ["subscription.moved http://test3/"], "Received changes");
changes = [];
- test.ok(!FilterStorage.moveSubscription(subscription2), "Move of removed subscription failed");
+ test.ok(!silenceAssertionOutput(
+ () => FilterStorage.moveSubscription(subscription2),
+ "Attempt to move a subscription that is not in the list"
+ ), "Move of removed subscription failed");
compareSubscriptionList(test, "Move of removed subscription", [subscription1, subscription3]);
test.deepEqual(changes, [], "Received changes");
subscription1.delete();
subscription2.delete();
subscription3.delete();
test.done();
« test/_common.js ('K') | « test/_common.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld