Skip to content

Commit

Permalink
test: add non-integer test on xyJoinX
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Nov 18, 2024
1 parent 708261f commit 7301987
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/xy/__tests__/xyJoinX.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 7301987

Please sign in to comment.