Skip to content

[TESTING] Write unit tests for environment variable validation #337

@dev-fatima-24

Description

@dev-fatima-24

Priority: high

Description

The validateEnv() function must be tested to ensure it correctly identifies missing and malformed variables and exits with the right error messages.

Acceptance Criteria

  • Test: all required variables present passes validation
  • Test: missing required variable throws with the variable name
  • Test: ADMIN_SECRET_KEY not starting with 'S' throws with a format error
  • Test: STELLAR_NETWORK set to an invalid value throws
  • Test: validation function is callable without side effects in test environment

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions