createFakeNativeWorkouts — @gj-kit/expo-workouts
A public function from @gj-kit/expo-workouts/testing. The signature below is taken directly from the 0.1.1 release declaration.
Verified import example
Section titled “Verified import example”import { createFakeNativeWorkouts } from '@gj-kit/expo-workouts/testing';Signature, parameters, and return type
Section titled “Signature, parameters, and return type”/** * An in-memory `NativeWorkoutsModule`. * * ⚠ **The fake HONOURS SCOPES**: seed a fully-populated workout, authorize with only `['workouts']`, * and `listWorkouts` hands back `distanceM: undefined`. The read trap becomes reproducible in * `pnpm test`, on Node, in the CONSUMER'S OWN suite. The write side is symmetric: saving a workout * whose `requiredWriteScopes()` are not all granted rejects with `notAuthorized` naming the missing * scope, exactly as Android would. * * **States this fake still cannot reach** (they are platform facts with no seam representation): * - iOS `pendingUnlock` caused by `finishRoute` failing while locked — the seam reports one * `SaveOutcomeDto`, so the fake can produce `pendingUnlock`, but not the sub-case where the * workout landed and only the route builder failed (f70 was never reproduced on a device either). * - Health Connect's 30-day history wall silently TRUNCATING a large read (f46 in §5.7) — the * platform gives no signal, so nothing downstream can be asserted. * - `FLAG_PERMISSION_USER_FIXED` ("routes never work again, silently") — Phase 0 never reached it, * so there is no measured behaviour to imitate. */declare function createFakeNativeWorkouts(seed?: FakeSeed): FakeNativeWorkouts;This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.
Release context
Section titled “Release context”- Package:
@gj-kit/expo-workouts - Version:
0.1.1 - Public entry:
./testing - Source: GitHub