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: Created Nov. 23, 2017, 7:19 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, maybeExpectError} = 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");
+ maybeExpectError(
+ "Attempt to move a subscription that is not in the list",
+ () => test.ok(!FilterStorage.moveSubscription(subscription2), "Move of removed subscription failed")
sergei 2017/11/24 10:15:28 What about being more strict and wrap only the cal
hub 2017/11/24 15:48:59 Done.
+ );
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