mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
## Summary - Silence noisy `console.debug` and `console.info` logs in test output across `api` and `common-utils` packages - Add `DOTENV_CONFIG_OVERRIDE=true` to API integration test scripts so `.env.test` values take precedence - Add shared jest setup for `common-utils` to suppress verbose console output during tests Now the CI stdout should be much cleaner and readable (int tests especially)
22 lines
637 B
TypeScript
22 lines
637 B
TypeScript
// @eslint-disable @typescript-eslint/no-var-requires
|
|
jest.retryTimes(1, { logErrorsBeforeRetry: true });
|
|
|
|
global.console = {
|
|
...console,
|
|
// Turn off noisy console logs in tests
|
|
debug: jest.fn(),
|
|
info: jest.fn(),
|
|
};
|
|
|
|
// Mock alert notification functions to prevent HTTP calls during tests
|
|
jest.mock('@/utils/slack', () => ({
|
|
...jest.requireActual('@/utils/slack'),
|
|
postMessageToWebhook: jest.fn().mockResolvedValue(null),
|
|
}));
|
|
|
|
// Mock global fetch for generic webhook calls
|
|
global.fetch = jest.fn().mockResolvedValue({
|
|
ok: true,
|
|
text: jest.fn().mockResolvedValue(''),
|
|
json: jest.fn().mockResolvedValue({}),
|
|
} as any);
|