mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
17 lines
581 B
JavaScript
17 lines
581 B
JavaScript
import assert from 'assert';
|
|
import math from '../../../src/main';
|
|
|
|
describe('pickRandom', function () {
|
|
// Note: pickRandom is a convenience function generated by distribution
|
|
// it is tested in distribution.test.js
|
|
|
|
it('should have a function pickRandom', function () {
|
|
assert.strictEqual(typeof math.pickRandom, 'function')
|
|
})
|
|
|
|
it('should LaTeX pickRandom', function () {
|
|
const expression = math.parse('pickRandom([1,2,3])')
|
|
assert.strictEqual(expression.toTex(), '\\mathrm{pickRandom}\\left(\\begin{bmatrix}1\\\\2\\\\3\\\\\\end{bmatrix}\\right)')
|
|
})
|
|
})
|