diff --git a/packages/parse5/test/location-info-parser.test.js b/packages/parse5/test/location-info-parser.test.js index 4d4ce687..677869a9 100644 --- a/packages/parse5/test/location-info-parser.test.js +++ b/packages/parse5/test/location-info-parser.test.js @@ -159,8 +159,11 @@ exports['Updating node source code location (GH-314)'] = function() { }; } }; - const adapter = Object.assign(treeAdapters.default, sourceCodeLocationSetter); - const document = parse5.parse('Testing location', { adapter, sourceCodeLocationInfo: true }); + const treeAdapter = Object.assign({}, treeAdapters.default, sourceCodeLocationSetter); + const document = parse5.parse('Testing location', { + treeAdapter, + sourceCodeLocationInfo: true + }); const [doctype, html] = document.childNodes; const [head, body] = html.childNodes; const [text] = body.childNodes;