Skip to content

chore: add __mocks__ for actions and update jest setup#43

Merged
tenthirtyam merged 1 commit intomainfrom
chore/add-mocks-for-actions
Apr 29, 2026
Merged

chore: add __mocks__ for actions and update jest setup#43
tenthirtyam merged 1 commit intomainfrom
chore/add-mocks-for-actions

Conversation

@tenthirtyam
Copy link
Copy Markdown
Owner

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 the jest.setup.js configuration, and upgrading both runtime and development dependencies.

Test mocking improvements:

  • Added custom Jest mock implementations for @actions/core, @actions/cache, @actions/exec, and @actions/tool-cache in the __mocks__ directory to centralize and standardize test mocks. [1] [2] [3] [4]
  • Updated jest.setup.js to use these new mocks by referencing only the package names, removing inline mock implementations for the @actions/* packages.

Dependency upgrades:

  • Upgraded major versions of several dependencies in package.json, including @actions/core, @actions/cache, @actions/exec, @actions/tool-cache, eslint, @eslint/js, and typescript, ensuring compatibility with the latest features and bug fixes.

Type

  • This is a bug fix.
  • This is an enhancement or feature.
  • This is a code style/formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is a chore update
  • This is something else.
    Please describe:

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Test and Documentation

  • Tests have been completed.
  • Documentation has been added or updated.

Issue References

Additional Information

@tenthirtyam tenthirtyam self-assigned this Apr 29, 2026
@tenthirtyam tenthirtyam added the chore Chore label Apr 29, 2026
@tenthirtyam tenthirtyam force-pushed the chore/add-mocks-for-actions branch 4 times, most recently from 038aee5 to 4b89878 Compare April 29, 2026 20:39
@github-actions github-actions Bot added the documentation Documentation label Apr 29, 2026
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>
@tenthirtyam tenthirtyam force-pushed the chore/add-mocks-for-actions branch from 4b89878 to c5791af Compare April 29, 2026 20:41
@tenthirtyam tenthirtyam merged commit 90e7758 into main Apr 29, 2026
12 checks passed
@tenthirtyam tenthirtyam deleted the chore/add-mocks-for-actions branch April 29, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant