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

Remove redundant use of once in tests #2639

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

chrislo
Copy link
Contributor

@chrislo chrislo commented Jan 10, 2024

Trello: https://trello.com/c/wSKG73MP
Arises from: #2599

Using Mocha::ObjectMethods#expects "adds an expectation that the specified method must be called exactly once with any parameters"[1] so we don't need to chain once in these cases.

[1] https://mocha.jamesmead.org/Mocha/ObjectMethods.html#expects-instance_method

@chrislo chrislo force-pushed the remove-redundant-use-of-once branch from bb76ee9 to 601e28a Compare January 10, 2024 15:39
Using Mocha::ObjectMethods#expects "adds an expectation that the
specified method must be called exactly once with any parameters"[1]
so we don't need to chain `once` in these cases.

[1] https://mocha.jamesmead.org/Mocha/ObjectMethods.html#expects-instance_method
@chrislo chrislo force-pushed the remove-redundant-use-of-once branch from 601e28a to 4720262 Compare January 10, 2024 15:56
@chrislo chrislo marked this pull request as ready for review January 10, 2024 16:11
@floehopper floehopper self-assigned this Jan 11, 2024
@chrislo chrislo merged commit 51d782f into main Jan 11, 2024
16 checks passed
@chrislo chrislo deleted the remove-redundant-use-of-once branch January 11, 2024 09:58
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.

2 participants