chore: add __mocks__ for actions and update jest setup#43
Merged
tenthirtyam merged 1 commit intomainfrom Apr 29, 2026
Merged
Conversation
038aee5 to
4b89878
Compare
Add dedicated __mocks__ implementations for @actions/core, @actions/cache, @actions/exec and @actions/tool-cache (jest.fn() exports with license headers) and simplify jest.setup to use jest.mock(...) so Jest will pick up the automatic mocks. Tweak jest.config.js to use setupFilesAfterEnv for the test setup file. Also bump project dependencies (package.json / package-lock.json updated) to align with newer package versions. Signed-off-by: Ryan Johnson <ryan@tenthirtyam.org>
4b89878 to
c5791af
Compare
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.
Summary
Improves the test setup by refactoring how GitHub Actions dependencies are mocked and updating several dependencies to their latest major versions. The main changes include moving custom mocks for
@actions/*packages into the__mocks__directory, simplifying thejest.setup.jsconfiguration, and upgrading both runtime and development dependencies.Test mocking improvements:
@actions/core,@actions/cache,@actions/exec, and@actions/tool-cachein the__mocks__directory to centralize and standardize test mocks. [1] [2] [3] [4]jest.setup.jsto use these new mocks by referencing only the package names, removing inline mock implementations for the@actions/*packages.Dependency upgrades:
package.json, including@actions/core,@actions/cache,@actions/exec,@actions/tool-cache,eslint,@eslint/js, andtypescript, ensuring compatibility with the latest features and bug fixes.Type
Please describe:
Breaking Changes?
Test and Documentation
Issue References
Additional Information