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

implement subroutine mocking feature #322

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

ysugimoto
Copy link
Owner

Fixes #316

This PR implements a subroutine mocking feature in testing VCL. Now we add three functions:

  • testing.mock
  • testing.resotre_mock
  • testing.restore_all_mocks

This mechanism is very similar to Jest-like mocking system but it is a tiny note that both mocking subroutine names must be specified as STRING - it's some reason from our subroutine detecting logic.

@ysugimoto ysugimoto merged commit b6d09cb into main Jun 5, 2024
4 checks passed
@ysugimoto ysugimoto deleted the feature/testing-mock-subroutine branch June 5, 2024 05:28
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.

[Proposal] (testing) Mock custom VCL subroutine in testing
1 participant