Skip to content

Commit

Permalink
add test for linear dependence case
Browse files Browse the repository at this point in the history
  • Loading branch information
qlba committed Jul 1, 2020
1 parent e7759ad commit 605fd8f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/__tests__/LsmInterpolator.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,18 @@ t.test('LsmInterpolator', (t) => {
t.end();
});

t.test('with linear dependence', (t) => {
t.throws(
() => createLsmInterpolator({
xs: [0, 0, 0, 0, 0],
ys: [0, 2, 4, 6, 8],
coeffsCount: 5
}),
new Error('Failed to fit interpolator')
);

t.end();
});

t.end();
});

0 comments on commit 605fd8f

Please sign in to comment.