-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): add snm_test_utils as a dev dependency and refactor tests
This commit introduces the `snm_test_utils` crate as a new development dependency to facilitate testing within the `snm_config` and `snm_npmrc` modules. As a result, several test cases have been refactored to utilize this new utility, which simplifies the setup and teardown processes for environment variables and test contexts. The following changes were made: - Updated Cargo.toml files to include `snm_test_utils`. - Refactored test contexts to replace manual environment variable handling with the new `SnmTestContext` utility. - Eliminated redundant code related to environment setup in tests to improve readability and maintainability. These changes streamline the testing process and promote code reusability across different tests, leading to an overall improvement in test quality. BREAKING CHANGE: The removal of the manual environment variable management code could affect other areas that relied on the previous test setup strategy, necessitating an update to any related tests or modules.
- Loading branch information
Showing
10 changed files
with
151 additions
and
165 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "snm_test_utils" | ||
version = "0.1.0" | ||
edition = "2024" | ||
|
||
[dependencies] | ||
tempfile = { workspace = true } | ||
test-context = { workspace = true } | ||
uuid = { workspace = true, features = ["v4"] } |
Oops, something went wrong.