test(e2e): load secret from env#196
Open
duyhungtnn wants to merge 2 commits intomasterfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the E2E test setup to load required secrets from environment variables (optionally via a .env file) instead of hardcoding them in the AVA config, addressing issue #193.
Changes:
- Load
.envviadotenvand wire E2E config values fromprocess.env. - Update README E2E instructions and add
.env.exampletemplate. - Add
dotenvto devDependencies and ignore local.envfiles.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
ava-e2e.config.mjs |
Loads .env and passes env-derived secrets into AVA’s environmentVariables for E2E runs. |
package.json |
Adds dotenv (dev dependency) and reorders some dependencies. |
README.md |
Documents required env vars / .env usage for E2E testing. |
.env.example |
Provides a template for required E2E environment variables. |
.gitignore |
Prevents committing local .env secrets. |
yarn.lock |
Locks dotenv dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
Author
|
Hi @cre8ivejp, please help me to take a look. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates how environment variables are managed for E2E (end-to-end) tests by switching from hardcoded configuration in the test config file to using a
.envfile and thedotenvpackage. It also updates the documentation to reflect these changes and makes some minor adjustments to dependencies inpackage.json.fix #193