-
Notifications
You must be signed in to change notification settings - Fork 512
Closed
Labels
Description
Context
Follow-up to PR #9263 which replaced eval() with a safe math expression parser.
Requested by @christian-byrne in #9263 (comment)
Description
The math parser test suite should be extended to explicitly cover number format edge cases that are common gotchas in math parsers:
- Trailing dot:
123.(should evaluate to 123) - Trailing dot in expression:
123.+3(should evaluate to 126) - Lone dot:
.(should return undefined) - Double dot:
123..(should return undefined)
These edge cases are covered in expr-eval's test suite and would improve confidence in the parser's robustness.
Location
File: src/lib/litegraph/src/utils/mathParser.test.ts
References
- PR: [fix] Replace eval() with safe math expression parser #9263
- Comment: [fix] Replace eval() with safe math expression parser #9263 (comment)
┆Issue is synchronized with this Notion page by Unito
Reactions are currently unavailable