Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(mobile): 补齐共享弹层使用方的宽度修饰器 mock

Dash16bc1751bb0b
diff --git a/apps/mobile/src/__tests__/sessionOptionsExpoSheet.test.ts b/apps/mobile/src/__tests__/sessionOptionsExpoSheet.test.ts
index 67f07fdfc3..db19c11879 100644
--- a/apps/mobile/src/__tests__/sessionOptionsExpoSheet.test.ts
+++ b/apps/mobile/src/__tests__/sessionOptionsExpoSheet.test.ts
@@ -67,6 +67,7 @@ vi.mock('@expo/ui/swift-ui/modifiers', () => ({
'accessibilityAddTraits',
'accessibilityLabel',
'contentShape',
+ 'containerRelativeFrame',
'buttonStyle',
'disabled',
'font',
diff --git a/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx b/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx
index a10c73ed0a..38f153723d 100644
--- a/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx
+++ b/apps/mobile/src/__tests__/unifiedMobilePickerView.test.tsx
@@ -69,6 +69,8 @@ vi.mock('@expo/ui/swift-ui', async () => {
};
});
vi.mock('@expo/ui/swift-ui/modifiers', () => ({...Object.fromEntries(
+ ['containerRelativeFrame', 'onGeometryChange'].map(key => [key, (value: any) => ({ [key]: value })]),
+), ...Object.fromEntries(
['background', 'fixedSize', 'accessibilityElement', 'accessibilityHidden', 'opacity', 'scrollDisabled', 'scrollContentBackground', 'presentationDetents', 'presentationDragIndicator', 'interactiveDismissDisabled', 'contentShape', 'accessibilityLabel', 'buttonStyle', 'disabled', 'font', 'foregroundStyle', 'frame', 'pickerStyle', 'progressViewStyle', 'tint', 'tag', 'padding', 'autocorrectionDisabled', 'textInputAutocapitalization', 'lineLimit'].map(key => [key, (value: any) => ({ [key]: value })]),
), shapes:{rectangle:()=>({}), roundedRectangle:(value: any)=>value}}));
vi.mock('@expo/ui', () => ({Host:({children}:any)=>children}));