EnvModel: Activate onModuleInit only once
Overview
These tests validate nestjs-mod EnvModel: environment variable reading, required field validation, and DI value propagation into services.
What We Do And Verify
-
We verify how
configTransformandConfigModel/ConfigModelPropertydecorators process input parameters. -
We lock the validation contract and error shape expected by configuration consumers.
-
We confirm that modules/services receive properly prepared configuration values.
-
We explicitly validate the error contract: not only failure itself, but also error shape/content expected by module consumers.
-
We confirm correct lifecycle behavior in test environment: initialization, dependency readiness, and graceful shutdown of app/modules.