-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12519 from micalevisk/fix/issue-12518
fix(core): when the discoverable decorator was not used on calling `getProviders`/`getControllers`
- Loading branch information
Showing
3 changed files
with
41 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
integration/discovery/src/decorators/non-applied.decorator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { DiscoveryService } from '@nestjs/core'; | ||
|
||
/** | ||
* This decorator must not be used anywhere! | ||
* | ||
* This will be used to test the scenario where we are trying to retrieving | ||
* metadata for a discoverable decorator that was not applied to any class. | ||
*/ | ||
export const NonAppliedDecorator = DiscoveryService.createDecorator(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters