mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
17 lines
505 B
JavaScript
17 lines
505 B
JavaScript
import assert from 'assert'
|
|
import math from '../../../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.strictEqual(typeof math.random, 'function')
|
|
})
|
|
|
|
it('should LaTeX random', function () {
|
|
const expression = math.parse('random(0,1)')
|
|
assert.strictEqual(expression.toTex(), '\\mathrm{random}\\left(0,1\\right)')
|
|
})
|
|
})
|