(sym: string, val: number)
| 121 | expect(expr.toLatex()).toMatchInlineSnapshot(`3\\times2^2+5\\times2+3`); |
| 122 | |
| 123 | const term = (sym: string, val: number) => |
| 124 | ce |
| 125 | .expr(['Multiply', 3, ['Power', sym, 2]], { canonical: false }) |
| 126 | .subs({ [sym]: val }, { canonical: false }) |
| 127 | .toLatex(); |
| 128 | // A numeric base that prettifies to a square still needs an explicit sign |
| 129 | expect(term('x', 2)).toMatchInlineSnapshot(`3\\times2^2`); |
| 130 | expect(term('x', 10)).toMatchInlineSnapshot(`3\\times10^2`); |
no test coverage detected