Skip to content

Commit 46dbafa

Browse files
committed
test
1 parent dd1d647 commit 46dbafa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/compute-engine/calculus.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,4 +488,12 @@ describe('LIMIT', () => {
488488
expect(
489489
engine.parse('\\lim_{x \\to 0} \\frac{\\sin(x)}{x}').N().re
490490
).toMatchInlineSnapshot(`1`);
491+
492+
// Postfix ^ should be part of the limit body, not applied to the Limit
493+
test('power inside delimited limit body', () => {
494+
const expr = engine.parse('\\lim_{x\\to 0}\\left(x\\right)^x');
495+
// Should be Limit(x^x), not Power(Limit(x), x)
496+
expect(expr.operator).toBe('Limit');
497+
expect(expr.latex).toMatchInlineSnapshot(`\\lim_{x\\to0}x^{x}`);
498+
});
491499
});

0 commit comments

Comments
 (0)