Skip to content

Commit 6a73a1a

Browse files
test(client-runtime): type optional viewer profile correctly
1 parent 726770b commit 6a73a1a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎packages/client-runtime/src/device/phoneViewer.test.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ function fixture(profile?: DeviceShapeProfile) {
111111
const source = { width: 1206, height: 2622 } as HTMLCanvasElement;
112112
const onUnavailable = vi.fn();
113113
const onFramingAspect = vi.fn();
114-
const viewer = createPhoneViewer({ canvas, source, onUnavailable, onFramingAspect, profile });
114+
const viewer = createPhoneViewer({
115+
canvas,
116+
source,
117+
onUnavailable,
118+
onFramingAspect,
119+
...(profile ? { profile } : {}),
120+
});
115121
const draw = (time = now) => {
116122
now = time;
117123
const callbacks = [...pending.values()];

0 commit comments

Comments
 (0)