diff --git a/packages/sdk-utils/test/helper.js b/packages/sdk-utils/test/helper.js index 7f1f4290e..7167cb57c 100644 --- a/packages/sdk-utils/test/helper.js +++ b/packages/sdk-utils/test/helper.js @@ -3,8 +3,9 @@ const sdk = {}; // mock serialization script const serializeDOM = (options) => { - let doc = (options.dom || document).documentElement; - if (options.domTransformation) options.domTransformation(doc); + let { dom = document, domTransformation } = options || {}; + let doc = (dom || document).documentElement; + if (domTransformation) domTransformation(doc); return doc.outerHTML; };