mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
* setup linting with eslint-config-standard, prettier * [autofix] npm run lint -- --fix with new setup * [manual] fix types/ directory errors * [manual] fix linting errors in test/ directory * [manual] fix single linting error in src/ * revert ts-expect-error comment change * error on .only in mocha tests * fix test description typo * move some short objects to single line * add and gitignore eslintcache * individually suppress ts any * set --max-warnings to 0 * extract matrices to constants * update ts-expect-error comments
21 lines
548 B
JavaScript
21 lines
548 B
JavaScript
import assert from 'assert'
|
|
import math from '../../../src/defaultInstance.js'
|
|
|
|
describe('config', function () {
|
|
it('should allow setting config after having overwritten import', function () {
|
|
const math2 = math.create()
|
|
|
|
assert.strictEqual(math2.typeOf(math2.pi), 'number')
|
|
|
|
math2.import({
|
|
import: () => { throw new Error('Function import is disabled') }
|
|
}, { override: true })
|
|
|
|
math2.config({ number: 'BigNumber' })
|
|
|
|
assert.strictEqual(math2.typeOf(math2.pi), 'BigNumber')
|
|
})
|
|
|
|
// TODO: test function config
|
|
})
|