收口移动壳角标平台差异门禁
移动壳配置检查反查 Android 角标请求返回 unsupported_capability 的测试覆盖 HostBridge 协议文档明确 Android 不声明角标且不得伪造成功 项目记忆记录移动壳角标平台差异测试门禁
This commit is contained in:
@@ -2015,6 +2015,19 @@ for (const snippet of [
|
||||
throw new Error(`mobile shell badge module is missing ${snippet}`);
|
||||
}
|
||||
}
|
||||
for (const snippet of [
|
||||
"test('app.setBadgeCount 拒绝非法数量并在 Android 返回 unsupported'",
|
||||
"setPlatformOS('android')",
|
||||
"request('app.setBadgeCount',",
|
||||
"expect(expectFailed(unsupported).error.code).toBe('unsupported_capability')",
|
||||
'expect(PushNotificationIOS.setApplicationIconBadgeNumber).not.toHaveBeenCalled()',
|
||||
]) {
|
||||
if (!bridgeTestSource.includes(snippet)) {
|
||||
throw new Error(
|
||||
`mobile shell bridge tests must cover Android app.setBadgeCount unsupported semantics: ${snippet}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!dispatchSource.includes('getMobileHostBridgeAppearanceColorScheme(request)') ||
|
||||
|
||||
Reference in New Issue
Block a user