UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

17 lines (13 loc) 526 B
var assert = require('assert'), math = require('../../../index'); describe('randomInt', function () { // Note: randomInt is a convenience function generated by distribution // it is tested in distribution.test.js it('should have a function randomInt', function () { assert.equal(typeof math.randomInt, 'function'); }) it('should LaTeX randomInt', function () { var expression = math.parse('randomInt(0,100)'); assert.equal(expression.toTex(), '\\mathrm{randomInt}\\left(0,100\\right)'); }); });