Validate that setSuiteProperty and setSpecProperty args are cloneable

This commit is contained in:
Steve Gravrock
2025-09-21 15:08:53 -07:00
parent 970cbdc69c
commit 7214ccd3dc
6 changed files with 74 additions and 2 deletions

View File

@@ -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;
};