Also require setSpecProperty/setSuiteProperty args to be JSON serializable

This commit is contained in:
Steve Gravrock
2025-09-27 15:40:19 -07:00
parent c2ce55580c
commit e11f320df3
5 changed files with 42 additions and 12 deletions

View File

@@ -74,8 +74,8 @@ getJasmineRequireObj().Spec = function(j$) {
// Key and value will eventually be cloned during reporting. The error
// thrown at that point if they aren't cloneable isn't very helpful.
// Throw a better one now.
j$.private.util.assertStructuredCloneable(key, 'Key');
j$.private.util.assertStructuredCloneable(value, 'Value');
j$.private.util.assertReporterCloneable(key, 'Key');
j$.private.util.assertReporterCloneable(value, 'Value');
this.result.properties = this.result.properties || {};
this.result.properties[key] = value;
}