fix(docs): refresh documentation and test timing tolerances for updated APIs

This commit is contained in:
2026-05-09 12:36:02 +00:00
parent 6d6a08b168
commit 6c8485c779
11 changed files with 2093 additions and 3106 deletions
+7 -7
View File
@@ -170,8 +170,8 @@ tap.test('HrtMeasurement should capture accurate timing', async (tools) => {
measurement.stop();
// Should be at least 50ms
expect(measurement.milliSeconds).toBeGreaterThanOrEqual(50);
// Timers can resolve slightly below the requested delay due to sub-ms rounding.
expect(measurement.milliSeconds).toBeGreaterThanOrEqual(45);
// But not too much more (allow for some overhead)
expect(measurement.milliSeconds).toBeLessThan(100);
});
@@ -192,13 +192,13 @@ tap.test('multiple timing measurements should be independent', async (tools) =>
await tools.delayFor(25);
measurement2.stop();
// measurement1 should be ~50ms (25ms + 25ms)
expect(measurement1.milliSeconds).toBeGreaterThanOrEqual(50);
// measurement1 should be ~50ms (25ms + 25ms), allowing minor timer jitter.
expect(measurement1.milliSeconds).toBeGreaterThanOrEqual(45);
expect(measurement1.milliSeconds).toBeLessThan(70);
// measurement2 should be ~50ms (25ms + 25ms)
expect(measurement2.milliSeconds).toBeGreaterThanOrEqual(50);
// measurement2 should be ~50ms (25ms + 25ms), allowing minor timer jitter.
expect(measurement2.milliSeconds).toBeGreaterThanOrEqual(45);
expect(measurement2.milliSeconds).toBeLessThan(70);
});
tap.start();
tap.start();