mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
Conflicts: HISTORY.md bower.json component.json dist/math.js dist/math.map dist/math.min.js docs/reference/units.md lib/version.js package.json test/function/construction/chain.test.js test/function/matrix/det.test.js test/function/matrix/transpose.test.js test/function/utils/import.test.js
19 lines
517 B
JavaScript
19 lines
517 B
JavaScript
var assert = require('assert');
|
|
var math = require('../../../index');
|
|
var Chain = math.type.Chain;
|
|
|
|
describe('chain', function() {
|
|
|
|
it ('should construct a chain', function () {
|
|
assert.ok(math.chain(45) instanceof Chain);
|
|
assert.ok(math.chain(math.complex(2, 3)) instanceof Chain);
|
|
assert.ok(math.chain() instanceof Chain);
|
|
});
|
|
|
|
it('should LaTeX chain', function () {
|
|
var expression = math.parse('chain(1)');
|
|
assert.equal(expression.toTex(), '\\mathrm{chain}\\left({1}\\right)');
|
|
});
|
|
|
|
});
|