mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(editor): Handle Insights calculations to prevent Infinity numbers (#15727)
This commit is contained in:
committed by
GitHub
parent
3c0e13dd6a
commit
d1a39d96bb
@@ -81,8 +81,8 @@ describe('Insights Transformers', () => {
|
||||
});
|
||||
|
||||
it('should return Infinity if value equals deviation (and thus previous value is 0)', () => {
|
||||
expect(transformInsightsDeviation.total(10, 10)).toBe(Infinity);
|
||||
expect(transformInsightsDeviation.failed(5, 5)).toBe(Infinity);
|
||||
expect(transformInsightsDeviation.total(10, 10)).toBe(null);
|
||||
expect(transformInsightsDeviation.failed(5, 5)).toBe(null);
|
||||
});
|
||||
|
||||
it('should return 0 if deviation is 0 and value is not 0', () => {
|
||||
|
||||
Reference in New Issue
Block a user