Skip to content

Skip integration tests when ALCHEMY_API_KEY is not set#327

Closed
dawsbot wants to merge 1 commit intomasterfrom
fix/integration-tests-without-api-key
Closed

Skip integration tests when ALCHEMY_API_KEY is not set#327
dawsbot wants to merge 1 commit intomasterfrom
fix/integration-tests-without-api-key

Conversation

@dawsbot
Copy link
Owner

@dawsbot dawsbot commented Feb 15, 2026

Problem:
Integration tests that require ALCHEMY_API_KEY were failing locally with 'Must be authenticated!' or 'ALCHEMY_API_KEY is not defined' errors when the environment variable was not set.

Solution:

  • Added skipWithoutAlchemyKey helper to rpc-urls.ts
  • Updated all integration tests that depend on rpcUrls.mainnet to use describe.skipIf(skipWithoutAlchemyKey) or it.skipIf(skipWithoutAlchemyKey)
  • Tests now gracefully skip in local development without the API key
  • Tests still run in CI where the ALCHEMY_API_KEY secret is available

Result:

  • ✅ All tests pass locally (45 passed, 16 skipped)
  • ✅ No more 'Must be authenticated!' errors
  • ✅ Fixes pre-existing test failures that were blocking development

Files changed: 18 test files updated

Fixes the pre-existing test infrastructure issue that was blocking local development and PR #316.

- Add skipWithoutAlchemyKey helper to rpc-urls.ts
- Update all integration tests that use rpcUrls.mainnet to skip when API key is missing
- Fixes 'Must be authenticated!' errors in local development
- Tests still run in CI where ALCHEMY_API_KEY secret is available
@vercel
Copy link

vercel bot commented Feb 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
essential-eth Ready Ready Preview, Comment Feb 15, 2026 7:04pm

@dawsbot dawsbot closed this Feb 15, 2026
@dawsbot dawsbot deleted the fix/integration-tests-without-api-key branch February 15, 2026 19:16
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