17
spec/helpers/checkForUrl.js
Normal file
17
spec/helpers/checkForUrl.js
Normal file
@@ -0,0 +1,17 @@
|
||||
/* 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());
|
||||
Reference in New Issue
Block a user