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): verify stable navigation options

nothingyuancandoa4554c9cfa9f
diff --git a/apps/mobile/src/__tests__/navigationOptionsStability.test.ts b/apps/mobile/src/__tests__/navigationOptionsStability.test.ts
deleted file mode 100644
index 39807da16e..0000000000
--- a/apps/mobile/src/__tests__/navigationOptionsStability.test.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { readFileSync } from 'node:fs';
-import { resolve } from 'node:path';
-import { describe, expect, it } from 'vitest';
-
-function readSource(relativePath: string): string {
- return readFileSync(resolve(process.cwd(), relativePath), 'utf8').replace(/\r\n/g, '\n');
-}
-
-describe('navigation option stability', () => {
- it('keeps login and system-back screen options stable across unrelated rerenders', () => {
- const systemBack = readSource('src/platform/chrome/SystemNavigationBack.tsx');
- expect(systemBack).toContain('const screenOptions = useMemo(() => ({');
- expect(systemBack).toContain('<Stack.Screen options={screenOptions} />');
- expect(systemBack).not.toContain('<Stack.Screen options={{');
-
- const login = readSource('app/(auth)/login.tsx');
- expect(login).toContain('const loginStatusBarOptions = useMemo(() => ({');
- expect(login).toContain('<Stack.Screen options={loginStatusBarOptions} />');
- });
-});