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

Unified Diff: test/notification.js

Issue 30032558: Noissue - Fix tests on NodeJS < 10 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Remove URL from eslint globals Created March 28, 2019, 11:48 a.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
« no previous file with comments | « test/.eslintrc.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/notification.js
===================================================================
--- a/test/notification.js
+++ b/test/notification.js
@@ -20,16 +20,19 @@
let {
createSandbox, setupTimerAndFetch, setupRandomResult, unexpectedError
} = require("./_common");
let Prefs = null;
let Utils = null;
let Notification = null;
+// Only starting NodeJS 10 that URL is in the global space.
+const {URL} = require("url");
+
exports.setUp = function(callback)
{
// Inject our Array and JSON to make sure that instanceof checks on arrays
// within the sandbox succeed even with data passed in from outside.
let globals = Object.assign({Array, JSON},
setupTimerAndFetch.call(this), setupRandomResult.call(this));
let sandboxedRequire = createSandbox({globals});
« no previous file with comments | « test/.eslintrc.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld