Index: test/browser/snippets.js
===================================================================
--- a/test/browser/snippets.js
+++ b/test/browser/snippets.js
@@ -12,229 +12,233 @@
* 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 .
*/
"use strict";
+/* global assert */
+
const library = require("../../lib/content/snippets.js");
const {timeout} = require("./_utils");
-// We need this stub for the injector.
-window.browser = {
- runtime: {
- getURL: () => ""
- }
-};
-
-async function runSnippet(test, snippetName, ...args)
+describe("Snippets", () =>
{
- let snippet = library[snippetName];
+ before(() =>
+ {
+ // We need this stub for the injector.
+ window.browser = {
+ runtime: {
+ getURL: () => ""
+ }
+ };
+ });
- test.ok(snippet);
+ async function runSnippet(snippetName, ...args)
+ {
+ let snippet = library[snippetName];
- snippet(...args);
+ assert.ok(snippet);
- // For snippets that run in the context of the document via a