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

feat: error on wrong decorator dependency type #3090

Merged
merged 1 commit into from
May 23, 2021

Conversation

simoneb
Copy link
Contributor

@simoneb simoneb commented May 23, 2021

Throws a meaningful error if a server decorator dependency is specified and it is not an array. The code assumes an array and will fail with misleading errors in case something else is provided.

Also fixes a few assertions in the decorator.test.js file where t.ok was mistakenly used to do an equality check. Replaced with t.same.

Checklist

@simoneb simoneb force-pushed the feat/decorator-dependency-type branch from 383f944 to e70f72a Compare May 23, 2021 16:32
Copy link
Member

@L2jLiga L2jLiga 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

@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

@mcollina mcollina merged commit 21d070a into fastify:main May 23, 2021
@mcollina
Copy link
Member

Thanks!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2022
@simoneb simoneb deleted the feat/decorator-dependency-type branch May 24, 2022 08:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants