Skip to content

fix(ci): expose API_URL env var to frontend unit tests#41

Merged
dancodingbr merged 1 commit into
mainfrom
feat/env-api-url
May 2, 2026
Merged

fix(ci): expose API_URL env var to frontend unit tests#41
dancodingbr merged 1 commit into
mainfrom
feat/env-api-url

Conversation

@dancodingbr
Copy link
Copy Markdown
Owner

Summary

  • @ngx-env/builder reads API_URL from process.env at build time
  • In CI the root .env is gitignored so API_URL was never set, leaving import.meta.env.API_URL undefined at runtime
  • All component tests that import the environment file were triggering Angular DI assertion failures as a result

Test plan

  • CI Test (frontend) job passes with all 96 unit tests green

🤖 Generated with Claude Code

@ngx-env/builder reads API_URL from process.env at build time. In CI
the root .env is not present (gitignored), so API_URL was never set,
leaving import.meta.env.API_URL undefined at runtime and causing Angular
DI assertion failures across all component tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dancodingbr dancodingbr merged commit 6603006 into main May 2, 2026
16 checks passed
@dancodingbr dancodingbr deleted the feat/env-api-url branch May 2, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant