Skip to content

Commit 2dd4429

Browse files
authored
Update unit-testing.md
Removed a warning about global enhancers with a link to a workaround in Github as the workaround is the very next section
1 parent 560719b commit 2dd4429

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

content/fundamentals/unit-testing.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ Each of the override method types, in turn, returns the `TestingModule` instance
336336

337337
Also, sometimes you may want to provide a custom logger e.g. when the tests are run (for example, on a CI server). Use the `setLogger()` method and pass an object that fulfills the `LoggerService` interface to instruct the `TestModuleBuilder` how to log during tests (by default, only "error" logs will be logged to the console).
338338

339-
> warning **Warning** The `@nestjs/core` package exposes unique provider tokens with the `APP_` prefix to help on define global enhancers. Those tokens cannot be overridden since they can represent multiple providers. Thus you can't use `.overrideProvider(APP_GUARD)` (and so on). If you want to override some global enhancer, follow [this workaround](https://github.com/nestjs/nest/issues/4053#issuecomment-585612462).
340-
341339
The compiled module has several useful methods, as described in the following table:
342340

343341
<table>

0 commit comments

Comments
 (0)