Skip to content

Commit

Permalink
chore: test code examples by comparing as Array instead of as `Matr…
Browse files Browse the repository at this point in the history
…ix` to prevent issues with differing datatype
  • Loading branch information
josdejong committed Jul 30, 2024
1 parent 5761168 commit cf5e8d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/node-tests/doc.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function maybeCheckExpectation (name, expected, expectedFrom, got, gotFrom) {
function checkExpectation (want, got) {
if (Array.isArray(want)) {
if (!Array.isArray(got)) {
want = math.matrix(want)
got = want.valueOf()
}
return approxDeepEqual(got, want, 1e-9)
}
Expand Down

0 comments on commit cf5e8d8

Please sign in to comment.