From 26f9b1bfc8553e13b139003de8cc50dcd193847f Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] fix types in replayer unit test --- test/replayer.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/replayer.test.ts b/test/replayer.test.ts index ee591f4f..6fc3cc53 100644 --- a/test/replayer.test.ts +++ b/test/replayer.test.ts @@ -151,7 +151,7 @@ describe('replayer', function(this: ISuite) { it('can get meta data', async () => { const meta = await this.page.evaluate(() => { - const { Replayer } = (window as IWindow).rrweb; + const { Replayer } = ((window as unknown) as IWindow).rrweb; const replayer = new Replayer(events); return replayer.getMetaData(); }); @@ -162,7 +162,7 @@ describe('replayer', function(this: ISuite) { it('will start actions when play', async () => { const actionLength = await this.page.evaluate(() => { - const { Replayer } = (window as IWindow).rrweb; + const { Replayer } = ((window as unknown) as IWindow).rrweb; const replayer = new Replayer(events); replayer.play(); return replayer['timer']['actions'].length; @@ -172,7 +172,7 @@ describe('replayer', function(this: ISuite) { it('will clean actions when pause', async () => { const actionLength = await this.page.evaluate(() => { - const { Replayer } = (window as IWindow).rrweb; + const { Replayer } = ((window as unknown) as IWindow).rrweb; const replayer = new Replayer(events); replayer.play(); replayer.pause(); @@ -183,7 +183,7 @@ describe('replayer', function(this: ISuite) { it('can play at any time offset', async () => { const actionLength = await this.page.evaluate(() => { - const { Replayer } = (window as IWindow).rrweb; + const { Replayer } = ((window as unknown) as IWindow).rrweb; const replayer = new Replayer(events); replayer.play(1500); return replayer['timer']['actions'].length; @@ -195,7 +195,7 @@ describe('replayer', function(this: ISuite) { it('can resume at any time offset', async () => { const actionLength = await this.page.evaluate(() => { - const { Replayer } = (window as IWindow).rrweb; + const { Replayer } = ((window as unknown) as IWindow).rrweb; const replayer = new Replayer(events); replayer.play(1500); replayer.pause();