| 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(); |