mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
17 lines
528 B
JavaScript
17 lines
528 B
JavaScript
const assert = require('assert')
|
|
const math = require('../../../src/main')
|
|
|
|
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 () {
|
|
const expression = math.parse('randomInt(0,100)')
|
|
assert.equal(expression.toTex(), '\\mathrm{randomInt}\\left(0,100\\right)')
|
|
})
|
|
})
|