Skip to content

Commit

Permalink
test: add a test of xyEnsureGrowingX (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny authored Oct 9, 2024
1 parent ee58725 commit 7797a5a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/xy/__tests__/xyEnsureGrowingX.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ test('normal serie', () => {
expect(ans.x).toStrictEqual(x);
expect(ans.y).toStrictEqual(x);
});

test('reverse series. Not sure it is what we expect', () => {
const x = [5, 4, 3, 2, 1];
const y = [1, 2, 3, 4, 5];
const ans = xyEnsureGrowingX({ x, y });
expect(ans).toStrictEqual({ x: [5], y: [1] });
});

0 comments on commit 7797a5a

Please sign in to comment.