mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-24 17:41:27 -04:00
Fix tests
This commit is contained in:
@@ -71,7 +71,7 @@ export function logPageView(path: string): void {
|
||||
}
|
||||
|
||||
const currentLevel = (): LogLevel => {
|
||||
if (IS_PROD) return 'info'
|
||||
if (IS_PROD || process.env.NODE_ENV == 'production') return 'info'
|
||||
return 'debug'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {logApiError, logger} from 'common/lib/logger'
|
||||
import {logApiError, logger} from 'common/logger'
|
||||
|
||||
describe('logger', () => {
|
||||
const originalEnv = process.env.NODE_ENV
|
||||
@@ -48,6 +48,7 @@ describe('logger', () => {
|
||||
|
||||
it('logs debug messages only in development', () => {
|
||||
process.env.NODE_ENV = 'production'
|
||||
|
||||
const consoleSpy = jest.spyOn(console, 'debug').mockImplementation(() => {})
|
||||
|
||||
logger.debug('Debug message')
|
||||
Reference in New Issue
Block a user