Validate that setSuiteProperty and setSpecProperty args are cloneable
This commit is contained in:
@@ -80,5 +80,13 @@ getJasmineRequireObj().util = function(j$) {
|
||||
}
|
||||
};
|
||||
|
||||
util.assertStructuredCloneable = function(v, msgPrefix) {
|
||||
try {
|
||||
structuredClone(v);
|
||||
} catch (e) {
|
||||
throw new Error(`${msgPrefix} can't be cloned`, { cause: e });
|
||||
}
|
||||
};
|
||||
|
||||
return util;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user