Skip to content

Commit 3dbb353

Browse files
committed
refactor: clean up
1 parent 823b188 commit 3dbb353

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/math-utils/src/memory_calculator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
minDependencies,
1212
multiplyDependencies,
1313
notDependencies,
14+
// @ts-expect-error nullishDependencies is not declared in types. https://github.com/josdejong/mathjs/issues/3597
1415
nullishDependencies,
1516
orDependencies,
1617
subtractDependencies,

test/memory_calculator.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('calculateDefaultMemoryFromExpression', () => {
5555

5656
describe('operations supported', () => {
5757
const context = {
58-
input: { A: 200, B: 10, C: 4, nullVal: null, zeroVal: 0, startUrls: [1, 2, 3] },
58+
input: { },
5959
runOptions: { timeoutSecs: 60, memoryMbytes: 512 },
6060
};
6161

@@ -70,7 +70,7 @@ describe('calculateDefaultMemoryFromExpression', () => {
7070
{ expression: '(true or false) ? 5 : 0', desc: 'or allowed' },
7171
{ expression: '(true xor false) ? 5 : 0', desc: 'xor allowed' },
7272
{ expression: 'not(false) ? 5 : 0', desc: 'not allowed' },
73-
{ expression: 'input.nullVal ?? 256', desc: 'nullish coalescing allowed' },
73+
{ expression: 'null ?? 256', desc: 'nullish coalescing allowed' },
7474
{ expression: 'a = 5', desc: 'variable assignment' },
7575
];
7676

0 commit comments

Comments
 (0)