feat(packages): fix test assertions for x-request-id header compatibility

- Update kill-switch-client and feature-flag-client tests to use
  expect.objectContaining for headers to handle x-request-id
- Move React Native SDK roadmap to completed/

Total: 44 client-side package tests passing
This commit is contained in:
saravanakumardb1 2026-03-02 09:08:45 -08:00
parent 7ca2139418
commit 10e252617b
4 changed files with 12 additions and 14 deletions

View File

@ -2,15 +2,13 @@
> **Scope:** `@bytelyst/*` client-side packages for React Native (Expo) and web PWAs
> **Location:** `learning_ai_common_plat/packages/`
> **Status:** ⚠️ Partial — 2 of 8 needed packages exist
---
> **Status:** ✅ Complete — All 6 packages extracted, NomGap fully migrated, 44 tests passing
>
> **Completion Date:** 2026-03-02
## 1. Executive Summary
NomGap (React Native / Expo) is the only non-native mobile app in the ByteLyst ecosystem. It currently uses **2 shared packages** from common-plat (`@bytelyst/auth-client` and `@bytelyst/telemetry-client`) but still has **6 hand-rolled platform modules** that should be extracted into shared packages.
These same TypeScript client packages also benefit **ChronoMind web** (Next.js PWA), **MindLyst web**, and any future web or React Native products.
NomGap (React Native / Expo) is the only non-native mobile app in the ByteLyst ecosystem. It now uses **8 shared packages** from common-plat (`auth-client`, `telemetry-client`, `feature-flag-client`, `kill-switch-client`, `offline-queue`, `platform-client`, `blob-client`). These same TypeScript client packages also benefit **ChronoMind web** (Next.js PWA), **MindLyst web**, and any future web or React Native products.
---

View File

@ -71,7 +71,7 @@ describe('createFeatureFlagClient', () => {
expect(fetchMock).toHaveBeenCalledWith(
expect.stringContaining('/flags/poll?'),
expect.objectContaining({
headers: { 'x-product-id': 'testapp' },
headers: expect.objectContaining({ 'x-product-id': 'testapp' }),
})
);

View File

@ -81,7 +81,7 @@ describe('createKillSwitchClient', () => {
expect(fetchMock).toHaveBeenCalledWith(
expect.stringContaining('/flags/kill-switch'),
expect.objectContaining({
headers: { 'x-product-id': 'testapp' },
headers: expect.objectContaining({ 'x-product-id': 'testapp' }),
})
);
});

12
pnpm-lock.yaml generated
View File

@ -320,9 +320,9 @@ importers:
packages/blob:
dependencies:
'@azure/storage-blob':
specifier: '>=12.0.0'
version: 12.31.0
'@bytelyst/storage':
specifier: workspace:*
version: link:../storage
packages/blob-client: {}
@ -546,9 +546,6 @@ importers:
'@azure/cosmos':
specifier: ^4.2.0
version: 4.9.1(@azure/core-client@1.10.1)
'@azure/storage-blob':
specifier: ^12.31.0
version: 12.31.0
'@bytelyst/auth':
specifier: workspace:*
version: link:../../packages/auth
@ -573,6 +570,9 @@ importers:
'@bytelyst/fastify-core':
specifier: workspace:*
version: link:../../packages/fastify-core
'@bytelyst/storage':
specifier: workspace:*
version: link:../../packages/storage
'@fastify/cors':
specifier: ^10.0.2
version: 10.1.0