Is there a way to mute logger output while testing? #3921
-
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
Sep 28, 2022
Replies: 1 comment
-
You can implement the import Application from '@ioc:Adonis/Core/Application'
public async report(error: any, ctx: HttpContextContract) {
if (process.env.NODE_ENV === 'test') {
return
}
return super.report(error, ctx)
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SkifAlef
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can implement the
report
method within the global exception handler and disable it when in testing environment.