Merge branch 'main' into 3.99
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable compat/compat */
|
||||
(function(env) {
|
||||
env.hasFunctioningMaps = function() {
|
||||
if (typeof Map === 'undefined') {
|
||||
@@ -43,4 +44,10 @@
|
||||
env.pending('Browser has incomplete or missing support for Maps');
|
||||
}
|
||||
};
|
||||
|
||||
env.requireWeakMaps = function() {
|
||||
if (typeof WeakMap === 'undefined') {
|
||||
env.pending('Browser does not have support for WeakMap');
|
||||
}
|
||||
};
|
||||
})(jasmine.getEnv());
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable compat/compat */
|
||||
(function(env) {
|
||||
env.hasFunctioningSets = function() {
|
||||
if (typeof Set === 'undefined') {
|
||||
@@ -47,4 +48,10 @@
|
||||
env.pending('Browser has incomplete or missing support for Sets');
|
||||
}
|
||||
};
|
||||
|
||||
env.requireWeakSets = function() {
|
||||
if (typeof WeakSet === 'undefined') {
|
||||
env.pending('Browser does not have support for WeakSet');
|
||||
}
|
||||
};
|
||||
})(jasmine.getEnv());
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable compat/compat */
|
||||
(function(env) {
|
||||
function hasFunctioningSymbols() {
|
||||
if (typeof Symbol === 'undefined') {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable compat/compat */
|
||||
(function(env) {
|
||||
function hasFunctioningTypedArrays() {
|
||||
if (typeof Uint32Array === 'undefined') {
|
||||
|
||||
22
spec/helpers/generator.js
Normal file
22
spec/helpers/generator.js
Normal file
@@ -0,0 +1,22 @@
|
||||
(function(env) {
|
||||
function getGeneratorFuncCtor() {
|
||||
try {
|
||||
eval('var func = function*() {}');
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Object.getPrototypeOf(func).constructor;
|
||||
}
|
||||
|
||||
env.makeGeneratorFunction = function(text) {
|
||||
var GeneratorFunction = getGeneratorFuncCtor();
|
||||
return new GeneratorFunction(text || '');
|
||||
};
|
||||
|
||||
env.requireGeneratorFunctions = function() {
|
||||
if (!getGeneratorFuncCtor()) {
|
||||
env.pending('Environment does not support generator functions');
|
||||
}
|
||||
};
|
||||
})(jasmine.getEnv());
|
||||
Reference in New Issue
Block a user