mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-10 15:42:01 +03:00
add regression test for sequence error recovery
This commit is contained in:
parent
ca6fa6d381
commit
1a12d75ec6
1 changed files with 6 additions and 0 deletions
|
|
@ -215,6 +215,12 @@ describe("numeral systems", () => {
|
|||
});
|
||||
|
||||
describe("variables and document context", () => {
|
||||
it("sequence error recovery", () => {
|
||||
eng.addFunction({ id: "throw_err", phrases: "throw_err" }, () => {
|
||||
throw new Error("test error");
|
||||
});
|
||||
expect(calc("throw_err(1) 2 hours")).toBe("2 h");
|
||||
});
|
||||
it("assignment and reuse", () => {
|
||||
expect(calcDoc("x = 5\nx * 2")).toEqual(["5", "10"]);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue