Expo Easy Passkey

Testing

Verify Rust, TypeScript, native code, and devices

Run the full local verification suite before release:

cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
pnpm bindgen:check
pnpm check
pnpm verify:release-acceptance
pnpm build

pnpm check already runs the contract, unsupported-runtime, and example-backend Jest suites. Use pnpm test:acceptance locally when you want only that subset; CI and release do not run it again.

For npm publishing, use this page with Device E2E and Releasing. Testing covers automated checks. Releasing covers versioning, changelogs, npm provenance, and failure recovery.

App teams using the package should focus on the manual device checks. Maintainers should run the full suite after touching native code, Rust helpers, generated bindings, or public TypeScript types.

Acceptance plan

CI and release automation treat the following as one release-blocking acceptance plan. Any failure blocks publication.

GateWhat it proves
packages/module/src/contract.acceptance.test.tsRegistration and authentication through the public package-to-relying-party seam for the HTTPS iOS origin and every configured Android APK-key-hash origin, plus exact origin trust and iOS pre-presentation policy validation
apps/example-backend/src/server/{config,store,passkeys}.test.tsTrusted fingerprint conversion, concurrent and replayed ceremony isolation, and ceremony ID carry-through
packages/module/src/unsupported.runtime.test.tsPacked-package web/SSR import safety and ERR_PASSKEY_UNSUPPORTED ceremony errors
pnpm test:native:android / pnpm test:native:iosNative request mapping and iOS policy validation without launching system UI
Release native jobsTrusted artifact build, packaged-target inspection, FFI smoke tests, and exact-artifact publication
Device E2EAssociation, signing, system UI, and user verification behavior that fixtures cannot prove

Run the named acceptance subset locally with pnpm test:acceptance. Confirm the plan is still wired into CI and release with pnpm verify:release-acceptance (or pnpm verify:release-acceptance -- --list to print the inventory). CI verify runs those Jest files once through pnpm check, then the inventory gate.

Rust and FFI

Rust tests cover base64url normalization, RP ID validation, origin validation, client-data JSON, ceremony summaries, shared vectors, and direct FFI exports.

TypeScript

The Jest tests mock the native bridge behind expo-easy-passkey and cover:

  • availability
  • registration option forwarding
  • authentication option forwarding
  • response validation
  • deprecated aliases
  • native error code preservation
  • strict typing for TypeScript and JavaScript test files
  • validation, cancellation, malformed response, and invalid credential branches

Packed-package runtime tests also install the built tarball and import it under browser, SSR, and missing-native-module conditions. Those checks assert the unsupported capability result and ERR_PASSKEY_UNSUPPORTED ceremony errors without loading a real native module.

Native

Native unit tests cover request parsing, response mapping, and error mapping without launching passkey UI.

CI compiles the example app after expo prebuild, which is how consuming apps include the native module.

Device E2E

Before release, test on real devices. Passkey ceremonies depend on real platform accounts, associated domains, signing certificates, user verification UI, and credential providers.

On this page