mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
17 lines
503 B
JavaScript
17 lines
503 B
JavaScript
const assert = require('assert')
|
|
const math = require('../../../src/main')
|
|
|
|
describe('random', function () {
|
|
// Note: random is a convenience function generated by distribution
|
|
// it is tested in distribution.test.js
|
|
|
|
it('should have a function random', function () {
|
|
assert.equal(typeof math.random, 'function')
|
|
})
|
|
|
|
it('should LaTeX random', function () {
|
|
const expression = math.parse('random(0,1)')
|
|
assert.equal(expression.toTex(), '\\mathrm{random}\\left(0,1\\right)')
|
|
})
|
|
})
|