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

This commit is contained in:
Yanzhen Yu
2018-10-21 22:32:31 +08:00
parent 416c1eec9a
commit 202a674636
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());