mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
15 lines (11 loc) • 417 B
JavaScript
// test error messages for deprecated functions
var assert = require('assert'),
math = require('../index'),
number = require('../lib/utils/number');
describe('deprecated stuff', function() {
it ('should throw an error when using deprecated function assignment', function () {
assert.throws(function () {
new math.parse('function f(x) = x^2');
}, /Deprecated keyword "function"/);
});
});