Skip to content

add option to encapsulate#199

Merged
Eomm merged 6 commits intofastify:masterfrom
dwickern:encapsulate
Oct 13, 2022
Merged

add option to encapsulate#199
Eomm merged 6 commits intofastify:masterfrom
dwickern:encapsulate

Conversation

@dwickern
Copy link
Contributor

Checklist

Resolves #197

@dwickern
Copy link
Contributor Author

Will this change interact safely with fastify-autoload's default with the same name?

next()
}, {
name: 'encapsulated-plugin',
encapsulate: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a test that verifies what the docs say: does it run all the validations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you say the 1 test is enough? I'd rather avoid repeating the whole test suite

Copy link
Member

@Eomm Eomm Sep 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the cases that have not been tested have an undetermined state, so the maintainers can't help whoever opens an issue.

In this case, the maintainer should add a test case for it and add it to the repository etc.. in an endless pain loop.

So, we can discuss about the minimal test suite we need, but yes: 1 test is not enough of a HUGE feature like this.

So I think the minimal test suite for this test suite is:

  • check that the feature works as expected:
    • are decorators encapsulated?
    • is the fastify version check working?
    • are mandatory decorators checks applied?
    • is the required plugins option working?
  • verify how fastify reacts to this configuration (plugin name chaining)

dwickern and others added 2 commits September 22, 2022 08:28
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@Eomm Eomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you integrate this 00d2bdd
commit into this PR before landing?

@dwickern
Copy link
Contributor Author

Thanks @Eomm; I pushed your changes to this branch

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.

Introduce an option to encapsulate the plugin

5 participants