Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleans up tests a little bit #459

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

ralexmatthews
Copy link
Contributor

Description

This adds support for environment variables in the .env when running tests, and adds a mocharc.json file to hold the mocha commands.

I just added a requirement on the dotenv package, the standard Node.js package for reading .env files, and moved the command line flags from the package.json into a mocharc.json file.

This solves the issues of like:

  • Its been months since I worked on this, what were my API keys again?
  • I need to pass 3 env variables to the tests, and now my command is like 3 lines tall in the terminal

Also fixes the repl command, since that was pointing to a file that didn't exist.

Testing

This is a change to the testing suite itself, so if the tests pass, this is tested, I guess?

Pull Request Type

Please select the option(s) that are relevant to this PR.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement (fixing a typo, updating readme, renaming a variable name, etc)

@ralexmatthews ralexmatthews requested a review from a team July 22, 2024 15:59
@ralexmatthews ralexmatthews merged commit ef1fd7a into EasyPost:master Jul 22, 2024
14 checks passed
@ralexmatthews ralexmatthews deleted the dotenv-for-tests branch July 22, 2024 16:11
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.

2 participants