From 73019876f56c60c96a3cc8ff6aa10e76da367f32 Mon Sep 17 00:00:00 2001 From: Luc Patiny Date: Mon, 18 Nov 2024 15:35:27 +0100 Subject: [PATCH] test: add non-integer test on xyJoinX --- src/xy/__tests__/xyJoinX.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xy/__tests__/xyJoinX.test.ts b/src/xy/__tests__/xyJoinX.test.ts index 19dc6371..17196d75 100644 --- a/src/xy/__tests__/xyJoinX.test.ts +++ b/src/xy/__tests__/xyJoinX.test.ts @@ -29,6 +29,14 @@ test('no join', () => { }); }); +test('join 0.1', () => { + const data = { x: [0.2, 0.25, 1], y: [1, 1, 1] }; + expect(xyJoinX(data, { delta: 0.2 })).toStrictEqual({ + x: [0.225, 1], + y: [2, 1], + }); +}); + test('full join', () => { const data = { x: [2, 4, 6], y: [1, 1, 1] }; expect(xyJoinX(data, { delta: 5 })).toStrictEqual({