(
pattern: Expression,
expr: Expression,
options?: PatternMatchOptions
)
| 1169 | describe('matchPermutations option', () => { |
| 1170 | // Helper to match with non-canonical expressions to test permutation behavior |
| 1171 | const matchNonCanonical = ( |
| 1172 | pattern: Expression, |
| 1173 | expr: Expression, |
| 1174 | options?: PatternMatchOptions |
| 1175 | ) => { |
| 1176 | const boxedPattern = ce.expr(pattern, { form: 'raw' }); |
| 1177 | const boxedExpr = ce.expr(expr, { form: 'raw' }); |
| 1178 | return boxedExpr.match(boxedPattern, { useVariations: true, ...options }); |
| 1179 | }; |
| 1180 | |
| 1181 | test('default behavior tries permutations for commutative operators', () => { |
| 1182 | // Add is commutative, so pattern [Add, 1, _a] should match [Add, x, 1] |
no test coverage detected