File indexing completed on 2024-11-17 04:55:14
0001 /* This Source Code Form is subject to the terms of the Mozilla Public 0002 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 0003 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 0004 /* global describe, it */ 0005 0006 const { makeAdBlockClientFromListUUID } = require('../../lib/util') 0007 0008 const err = new Error() 0009 describe('utilTest', function () { 0010 this.timeout(0) 0011 describe('makeAdBlockClientFromListUUID', function () { 0012 it('throws an error for an invalid uuid which does not exist', function (cb) { 0013 makeAdBlockClientFromListUUID().then(() => { 0014 cb(err) 0015 }).catch((e) => { 0016 cb() 0017 }) 0018 }) 0019 it('can obtain list from default lists by uuid', function (cb) { 0020 makeAdBlockClientFromListUUID('67F880F5-7602-4042-8A3D-01481FD7437A').then(() => { 0021 cb() 0022 }).catch((e) => { 0023 cb(err) 0024 }) 0025 }) 0026 it('can obtain list from regions list by uuid', function (cb) { 0027 makeAdBlockClientFromListUUID('9FCEECEC-52B4-4487-8E57-8781E82C91D0').then(() => { 0028 cb() 0029 }).catch((e) => { 0030 cb(err) 0031 }) 0032 }) 0033 }) 0034 })