An open source design system that's fully customizable and agent ready
TypeScript
test(core): read the live offset in the nested-scroller pull-down test (#7188)
Cindy Zhanga9b5c3d2be91
diff --git a/packages/core/src/BottomSheet/useSheetGestures.test.ts b/packages/core/src/BottomSheet/useSheetGestures.test.tsindex 2df1312f9f..262845909d 100644--- a/packages/core/src/BottomSheet/useSheetGestures.test.ts+++ b/packages/core/src/BottomSheet/useSheetGestures.test.ts@@ -967,7 +967,8 @@ describe('useSheetGestures', () => {});expect(pull?.defaultPrevented).toBe(true);expect(hook.result.current.isDragging).toBe(true);- expect(hook.result.current.dragOffset).toBe(60);+ expect(liveOffset(hook)).toBe(60);+ expect(body.style.transform).toBe('translateY(60px)');});it('chains to a scrolled body before the sheet when the nested box is at its top', () => {