Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ jobs:
command: npx nx run-many --target ${{ matrix.test-suits.target || 'test' }} --projects "${{ matrix.test-suits.include }}" --exclude "${{ matrix.test-suits.exclude }}" --quiet
env:
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0
CI: true
- name: Truncate NX cache
run: ./tools/truncate-nx-cache.sh
build:
Expand Down
8 changes: 8 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ module.exports = {
snapshotFormat: { escapeString: true, printBasicPrototype: true },
transformIgnorePatterns: ['node_modules/(?!(lodash-es)/)'],
setupFilesAfterEnv: [__dirname + '/jest.setup.js'],
// Reduce log noise in CI
silent: process.env.CI === 'true',
// Optimize test execution
maxWorkers: process.env.CI === 'true' ? '50%' : '75%',
// Use minimal reporter in CI for cleaner logs
reporters: process.env.CI === 'true'
? [['default', { summaryThreshold: 0 }]]
: ['default'],
Comment on lines +22 to +24
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multi-line ternary expression is split inconsistently with the opening condition. Consider moving the entire ternary to one line or restructuring for better readability: reporters: process.env.CI === 'true' ? [['default', { summaryThreshold: 0 }]] : ['default'],

Suggested change
reporters: process.env.CI === 'true'
? [['default', { summaryThreshold: 0 }]]
: ['default'],
reporters: process.env.CI === 'true' ? [['default', { summaryThreshold: 0 }]] : ['default'],

Copilot uses AI. Check for mistakes.
};
12 changes: 12 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,15 @@ jest.mock('langfuse-vercel', () => ({
shutdown: jest.fn(),
})),
}));

// Suppress console output in CI to reduce log noise
if (process.env.CI === 'true') {
global.console = {
...console,
log: jest.fn(),
debug: jest.fn(),
info: jest.fn(),
warn: jest.fn(),
error: jest.fn(),
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mocking console.error will suppress error messages that are critical for debugging test failures in CI. Consider preserving console.error to ensure that genuine errors are still visible in CI logs, while mocking only the informational methods (log, debug, info, warn).

Suggested change
error: jest.fn(),

Copilot uses AI. Check for mistakes.
};
}
Loading