Commit 393de421 authored by Robert Knight's avatar Robert Knight

Work around broken URL constructor in PhantomJS 2.x

Under PhantomJS 2.x `new URL(uri)` works, so the feature test in
`polyfills.js` passes, but the resulting URL object is an apparently
empty object.

Properties such as `hostname` and `href` are missing for example.

Load the URL polyfill explicitly in the Karma-specific polyfill module.
parent f7c8ce56
......@@ -19,6 +19,10 @@ require('raf').polyfill();
// app itself.
require('./polyfills');
// PhantomJS 2.x includes a `URL` constructor so `new URL` works
// but it appears to be broken.
require('js-polyfills/url');
// disallow console output during tests
['debug', 'log', 'warn', 'error'].forEach(function (method) {
var realFn = window.console[method];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment