Files
jasmine/spec/helpers/checkForProxy.js
Steve Gravrock e4e232864d Don't expose Suite objects as this of describe functions
This was a holdover from 1.x that should have been removed in 2.0,
but was missed. Suite is meant to be private, and almost none of
its methods can be safely called by user code.
2021-05-22 09:15:22 -07:00

18 lines
348 B
JavaScript

/* eslint-disable compat/compat */
(function(env) {
function hasProxyConstructor() {
try {
new Proxy({}, {});
return true;
} catch (e) {
return false;
}
}
env.requireProxy = function() {
if (!hasProxyConstructor()) {
env.pending('Environment does not support Proxy');
}
};
})(jasmine.getEnv());