Files
OSIT-AE-App-Svelte/tests/verify_jwt_sync.js
Scott Idem 25d6503afe Environment & Bootstrap Stability: Fix Ghost Account and Modernize PWA Manifest
- Resolved 'Ghost Account' warning by updating layout hydration to align with V3 ID Vision (account_id vs account_id_random).
- Improved site lookup reliability using Agent API Key and structured EQ filters for exact FQDN matching (including ports).
- Modernized PWA manifest with maskable icons (PNG/WebP), app shortcuts, and unique installation IDs.
- Implemented automatic Electron 'Native' mode detection in root layout.
- Fixed stale API URLs in Launcher native file download logic.
- Added V3 migration documentation and JWT verification test scripts.
2026-01-20 18:22:14 -05:00

25 lines
601 B
JavaScript

let ae_loc_mock = { jwt: 'valid-jwt-token' };
let ae_api_mock = { headers: {} };
function simulate_effect() {
if (ae_api_mock.jwt !== ae_loc_mock.jwt) {
console.log('Syncing JWT to API config');
ae_api_mock = {
...ae_api_mock,
jwt: ae_loc_mock.jwt
};
}
}
console.log("--- Test: Sync JWT Effect ---");
console.log("Before:", ae_api_mock);
simulate_effect();
console.log("After:", ae_api_mock);
if (ae_api_mock.jwt === 'valid-jwt-token') {
console.log("PASS: JWT synced correctly.");
} else {
console.error("FAIL: JWT not synced.");
}