Publish curated ITWorx-Pulse source from 0e0633c8ac91cb71312a26837f791035a78d81b8
Public source validation / validate (push) Failing after 2m10s

This commit is contained in:
Public Source Publisher committed 2026-09-30 01:14:48 +00:00
1 parent a4956c2af9
commit db8093b608
88 files changed
+3685 -469

No files matched your search

@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest';
import { historicalSamplesFromData } from '../../src/liveBuffer';
describe('historical metric boundary', () => {
it('caps oversized upstream payloads before they enter chart state', () => {
const values = Array.from({ length: 12_000 }, (_, index) => [1_700_000_000 + index, String(index)]);
const result = historicalSamplesFromData({ result: Array.from({ length: 120 }, (_, index) => ({ metric: { host: `host-${index}` }, values })) });
expect(result).toHaveLength(10_000);
expect(new Set(result.map((sample) => sample.series)).size).toBe(1);
expect(result[0].value).toBe(2000);
});
});