Detect error when a prefix of a valid node name is used in a query
This commit is contained in:
parent
c71de5bd81
commit
67dcbc3e73
3 changed files with 10 additions and 8 deletions
|
|
@ -25,6 +25,9 @@ describe("Query", () => {
|
|||
assert.throws(() => {
|
||||
JavaScript.query("(non_existent)")
|
||||
}, "Bad node name 'non_existent'");
|
||||
assert.throws(() => {
|
||||
JavaScript.query("(a)")
|
||||
}, "Bad node name 'a'");
|
||||
assert.throws(() => {
|
||||
JavaScript.query("(function_declaration non_existent:(identifier))")
|
||||
}, "Bad field name 'non_existent'");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue