Tweak impossible pattern error messages

This commit is contained in:
Max Brunsfeld 2020-08-20 13:24:42 -07:00
parent 4301110c12
commit 9daec9cb22
10 changed files with 19 additions and 17 deletions

View file

@ -30,6 +30,9 @@ describe("Query", () => {
assert.throws(() => {
JavaScript.query("(function_declaration non_existent:(identifier))");
}, "Bad field name 'non_existent'");
assert.throws(() => {
JavaScript.query("(function_declaration name:(statement_block))");
}, "Bad pattern structure at offset 22: 'name:(statement_block))'");
});
it("throws an error on invalid predicates", () => {