Files
Genarrative/apps/mobile-shell/src/shell/safeArea.test.ts
T
kdletters b921c46afe 锁定移动壳安全区四边边界
移动壳 safeArea 单测补齐四边固定覆盖断言

移动壳配置门禁反查安全区测试边界

宿主壳方案和共享决策同步安全区验收口径
2026-06-20 09:27:41 +08:00

25 lines
603 B
TypeScript

import { describe, expect, test } from 'vitest';
import { MOBILE_SHELL_SAFE_AREA_EDGES } from './safeArea';
describe('mobile shell safe area', () => {
test('protects the WebView from every device edge', () => {
expect(MOBILE_SHELL_SAFE_AREA_EDGES).toEqual([
'top',
'right',
'bottom',
'left',
]);
});
test('keeps the edge list fixed for shell layout usage', () => {
expect(MOBILE_SHELL_SAFE_AREA_EDGES).toHaveLength(4);
expect([...MOBILE_SHELL_SAFE_AREA_EDGES].sort()).toEqual([
'bottom',
'left',
'right',
'top',
]);
});
});