createApp() builds the Application without listening, so tests can call app.handle() directly. The listen call is gated behind import.meta.main so importing server.ts no longer boots a port. ADMIN_DIDS is read inside requireAdmin on each call (was frozen at module load), and a mutable authenticator indirection lets tests stub authenticateRequest via _setAuthenticatorForTest.
8.3 KiB
8.3 KiB