fix(logger): don't color when running tests
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2552>
This commit is contained in:
parent
78be3d8feb
commit
fc979983ca
|
@ -52,6 +52,9 @@ const getFile = () => {
|
|||
|
||||
// NOTE: We're pushing all logs to the end of the event loop
|
||||
const createLoggerFn = (level: LogLevel) => {
|
||||
// NOTE: We don't want to handle logs ourselves in tests
|
||||
if (import.meta.env.VITEST) return console[level]
|
||||
|
||||
return (...args: any[]) => {
|
||||
const timestamp = new Date().toUTCString()
|
||||
const { method, file, lineNo } = getFile()
|
||||
|
|
Loading…
Reference in New Issue