Skip to content

requireEnv has no tests: boot-time env validation is uncovered #935

Description

@nanaf6203-bit

requireEnv has no tests: boot-time env validation is uncovered

Labels / Complexity: testing · Trivial — Trivial

Summary

src/lib/requireEnv.ts (requireEnvStrict) fails fast when required env vars are missing — the same class of boot gate the BackEnd has in validate-env.ts. It has no tests. A regression that lets the app boot without required secrets ships silently and surfaces only in deployment.

Proposal

  • Add a spec covering present, missing, and empty-value cases.

Acceptance criteria

  • The spec asserts the strict-validation behavior; it passes via npm test.

Getting started

  • src/lib/requireEnv.ts — the helper
  • src/lib/__tests__/ — existing lib test patterns

Commands: npm test.

Good first files to read: src/lib/requireEnv.ts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programTrivialtestingTest coverage or test reliability

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions