Skip to content

Add negative test on registering plugin twice without once#3632

Merged
hueniverse merged 1 commit intohapijs:masterfrom
WesTyler:negative_test_once
Oct 21, 2017
Merged

Add negative test on registering plugin twice without once#3632
hueniverse merged 1 commit intohapijs:masterfrom
WesTyler:negative_test_once

Conversation

@WesTyler
Copy link
Contributor

@WesTyler WesTyler commented Oct 21, 2017

This commit adds a negative test around registering the same plugin multiple times with once defaulted to false. This test is to clarify the intent of the once flag by displaying the difference in behavior when it is not set.

API.md is also updated to reflect the behavior now that connections are removed.

NOTE: I actually think that once can be deprecated entirely, and the default Error: Plugin ___ already registered used for all subsequent registrations. Please let me know if you'd like me to do that instead and I will close this PR and open a new one to remove once entirely.

@hueniverse hueniverse self-assigned this Oct 21, 2017
@hueniverse hueniverse added documentation Non-code related changes test Test or coverage labels Oct 21, 2017
@hueniverse hueniverse added this to the 17.0.0 milestone Oct 21, 2017
@hueniverse hueniverse merged commit 8e72274 into hapijs:master Oct 21, 2017
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Non-code related changes test Test or coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants