fix types in replayer unit test

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent bae4dd8294
commit 26f9b1bfc8

View File

@@ -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();