Files
jasmine/spec/helpers/checkForUrl.js
2020-11-21 13:47:44 -08:00

18 lines
353 B
JavaScript

/* eslint-disable compat/compat */
(function(env) {
function hasUrlConstructor() {
try {
new URL('http://localhost/');
return true;
} catch (e) {
return false;
}
}
env.requireUrls = function() {
if (!hasUrlConstructor()) {
env.pending('Environment does not support URLs');
}
};
})(jasmine.getEnv());