Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import { expect, it } from 'vitest'
import { parseMobilePushRegistration } from './mobile-push-contract'
it('rejects malformed known preferences', () => {
expect(
parseMobilePushRegistration({
registrationId: 'r',
expiresAt: Date.now() + 60000,
filter: { onlyWhenDesktopAway: 'true' }
})
).toBeUndefined()
})
it('retains valid preferences while ignoring unknown fields', () => {
expect(
parseMobilePushRegistration({
registrationId: 'r',
expiresAt: 123,
filter: { onlyWhenDesktopAway: true, sound: false, unknown: true }
})?.filter
).toEqual({ onlyWhenDesktopAway: true, sound: false })
})