diff options
Diffstat (limited to 'packages/core/src')
| -rw-r--r-- | packages/core/src/utils/bfsFileSearch.test.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/core/src/utils/bfsFileSearch.test.ts b/packages/core/src/utils/bfsFileSearch.test.ts index 3d5a0010..ce19f80e 100644 --- a/packages/core/src/utils/bfsFileSearch.test.ts +++ b/packages/core/src/utils/bfsFileSearch.test.ts @@ -258,10 +258,12 @@ describe('bfsFileSearch', () => { expect(avgDuration).toBeLessThan(2000); // Very generous limit // Ensure consistency across runs (variance should not be too high) - expect(consistencyRatio).toBeLessThan(1.5); // Max variance should be less than 150% of average + // More tolerant in CI environments where performance can be variable + const maxConsistencyRatio = process.env.CI ? 3.0 : 1.5; + expect(consistencyRatio).toBeLessThan(maxConsistencyRatio); // Max variance should be reasonable console.log( - `✅ Performance test passed: avg=${avgDuration.toFixed(2)}ms, consistency=${(consistencyRatio * 100).toFixed(1)}%`, + `✅ Performance test passed: avg=${avgDuration.toFixed(2)}ms, consistency=${(consistencyRatio * 100).toFixed(1)}% (threshold: ${(maxConsistencyRatio * 100).toFixed(0)}%)`, ); }); }); |
