use document object from params instead of the one in the current scope

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 349d78e02b
commit 19eca4da6d
3 changed files with 13 additions and 13 deletions

View File

@@ -101,7 +101,7 @@ describe('integration tests', () => {
const rebuildHtml = (await page.evaluate(`${this.code}
const x = new XMLSerializer();
const [snap] = rrweb.snapshot(document);
x.serializeToString(rrweb.rebuild(snap));
x.serializeToString(rrweb.rebuild(snap, document));
`)).replace(/\n\n/g, '');
const result = matchSnapshot(rebuildHtml, __filename, title);
assert(result.pass, result.pass ? '' : result.report());