Skip to content

feat: error on wrong decorator dependency type#3090

Merged
mcollina merged 1 commit intofastify:mainfrom
simoneb:feat/decorator-dependency-type
May 23, 2021
Merged

feat: error on wrong decorator dependency type#3090
mcollina merged 1 commit intofastify:mainfrom
simoneb:feat/decorator-dependency-type

Conversation

@simoneb
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
Member

Thanks!

@github-actions
Copy link
Copy Markdown

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