Skip to content

Commit 9b82da0

Browse files
committed
fix test
1 parent aea2951 commit 9b82da0

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

packages/replay-canvas/test/canvas.test.ts

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ it('initializes with default options', () => {
44
const rc = new ReplayCanvas();
55

66
expect(rc.getOptions()).toEqual({
7-
_experiments: {
8-
canvas: {
9-
manager: expect.any(Function),
10-
quality: 'medium',
11-
},
7+
recordCanvas: true,
8+
getCanvasManager: expect.any(Function),
9+
sampling: {
10+
canvas: 2,
11+
},
12+
dataURLOptions: {
13+
type: 'image/webp',
14+
quality: 0.4,
1215
},
1316
});
1417
});
@@ -17,11 +20,14 @@ it('initializes with quality option', () => {
1720
const rc = new ReplayCanvas({ quality: 'low' });
1821

1922
expect(rc.getOptions()).toEqual({
20-
_experiments: {
21-
canvas: {
22-
manager: expect.any(Function),
23-
quality: 'low',
24-
},
23+
recordCanvas: true,
24+
getCanvasManager: expect.any(Function),
25+
sampling: {
26+
canvas: 1,
27+
},
28+
dataURLOptions: {
29+
type: 'image/webp',
30+
quality: 0.25,
2531
},
2632
});
2733
});

0 commit comments

Comments
 (0)