Treasury & Bank Transfer Management System — سامانه مدیریت خزانهداری و حوالههای بانکی
dev/v7-production-failclosed-20261021
ci/public-windows-bridge-probe-20261017
ci/windows-dispatch-bootstrap-20261016
ci/windows-dual-app-lab-20261016
dev/v7-production-failclosed-20261021
feature/reconciliation-guard-20261013
main
phase-1-foundation
phase-1-implementation
phase-2-treasury-core
phase-3-banking-reconciliation
phase-4-operations-enterprise-ux
phase-5-hardening-release
phase-6-production-platform
phase-7-production-infrastructure-bank-golive
phase-7-sql-readonly-ux-20261015
transfer-exe-to-drive-20261006
| 1 | import {describe,expect,it} from 'vitest';import {readiness} from './readiness'; |
| 2 | describe('runtime readiness',()=>{it('is ready in non-production with bank disabled',()=>expect(readiness({NODE_ENV:'test',BANK_ADAPTER_MODE:'disabled'}).ready).toBe(true));it('fails closed in production without required external configuration',()=>{const r=readiness({NODE_ENV:'production',BANK_ADAPTER_MODE:'disabled',APP_BASE_URL:'https://x'});expect(r.ready).toBe(false);expect(r.missing).toEqual(['DATABASE_URL','IDENTITY_PROVIDER','AUTH_PROXY_HMAC_SECRET','KMS_KEY_ID','SIEM_ENDPOINT','WAF_POLICY_ID','ALERT_CHANNEL'])});it('accepts configured production while bank remains disabled',()=>expect(readiness({NODE_ENV:'production',BANK_ADAPTER_MODE:'disabled',APP_BASE_URL:'https://x',DATABASE_URL:'secret-ref',IDENTITY_PROVIDER:'oidc',AUTH_PROXY_HMAC_SECRET:'secret-store-ref',KMS_KEY_ID:'kms',SIEM_ENDPOINT:'siem',WAF_POLICY_ID:'waf',ALERT_CHANNEL:'ops'}).ready).toBe(true));it('accepts explicitly local desktop runtime without external production services',()=>expect(readiness({NODE_ENV:'production',TREASURYFLOW_DESKTOP_LOCAL:'1',BANK_ADAPTER_MODE:'disabled'}).ready).toBe(true));it('never reports ready for live bank mode',()=>expect(readiness({NODE_ENV:'test',BANK_ADAPTER_MODE:'live'}).ready).toBe(false))}); |
| 3 |