Skip to content

Add clearListeners and reset methods#9

Merged
vroomfondle merged 1 commit into
masterfrom
clear-hooks-method
Jul 13, 2023
Merged

Add clearListeners and reset methods#9
vroomfondle merged 1 commit into
masterfrom
clear-hooks-method

Conversation

@thybag
Copy link
Copy Markdown
Member

@thybag thybag commented Jul 13, 2023

When testing functionality there are cases when we want only a small subset of hooks to be in effect. This PR adds the ability to clear all active via clearListeners, so only the desired ones are setup.

I have additionally added the ability to do a full reset of the library, which in addition to clearing listeners, will also reset any stops or mocks that have been configured.

Tests have been added for the new methods.

@thybag thybag requested review from Xulai and vroomfondle July 13, 2023 15:42
@vroomfondle vroomfondle merged commit 34f7258 into master Jul 13, 2023
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.

3 participants