gradido/backend/test/testSetup.ts
Wolfgang Huß f8eea10371 Fix 'i18n' server integration for testing
- Fix the sending of the multiple times registrars name to the email owner.
- Clarify the logging of the multiple times registrars name and the email owners name.
2022-11-10 16:33:50 +01:00

39 lines
886 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { backendLogger as logger } from '@/server/logger'
// Wolle: import i18n from 'i18n'
import { i18n } from '@/server/localization'
jest.setTimeout(1000000)
jest.mock('@/server/logger', () => {
const originalModule = jest.requireActual('@/server/logger')
return {
__esModule: true,
...originalModule,
backendLogger: {
addContext: jest.fn(),
trace: jest.fn(),
debug: jest.fn(),
warn: jest.fn(),
info: jest.fn(),
error: jest.fn(),
fatal: jest.fn(),
},
}
})
jest.mock('@/server/localization', () => {
const originalModule = jest.requireActual('@/server/localization')
return {
__esModule: true,
...originalModule,
i18n: {
init: jest.fn(),
// configure: jest.fn(),
// setLocale: jest.fn(),
},
}
})
// Wolle: console.log('testSetup.js i18n: ', i18n)
export { logger, i18n }