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

add option to encapsulate #199

Merged
merged 6 commits into from
Oct 13, 2022
Merged

add option to encapsulate #199

merged 6 commits into from
Oct 13, 2022

Conversation

dwickern
Copy link
Contributor

Checklist

Resolves #197

README.md Outdated Show resolved Hide resolved
plugin.js Outdated Show resolved Hide resolved
@dwickern
Copy link
Contributor Author

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

test/test.js Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
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