Goal
Add focused tests for normalizePagePayloadForNativeLoad.
Context
Before loading page data into the native engine, the package normalizes blank, malformed, and legacy payloads. This is pure TypeScript logic and is a good place to add confidence without touching native code.
Suggested Scope
- Add a test file under
src/__tests__/ for src/payload.ts.
- Cover blank, whitespace-only, invalid JSON, array JSON, missing
pages, invalid pages, and valid payload cases.
- Assert both
isValid and reasonCode where useful.
Done When
- The new tests fail if invalid payloads are accidentally treated as safe native loads.
npm test passes.
Goal
Add focused tests for
normalizePagePayloadForNativeLoad.Context
Before loading page data into the native engine, the package normalizes blank, malformed, and legacy payloads. This is pure TypeScript logic and is a good place to add confidence without touching native code.
Suggested Scope
src/__tests__/forsrc/payload.ts.pages, invalidpages, and valid payload cases.isValidandreasonCodewhere useful.Done When
npm testpasses.