fix(node): update tests
This commit is contained in:
parent
9f2dc9d6b5
commit
8ab14a0ee5
3 changed files with 6 additions and 7 deletions
|
|
@ -5,7 +5,6 @@
|
|||
"_realloc",
|
||||
|
||||
"__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm",
|
||||
"__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9__grow_byEmmmmmm",
|
||||
"__ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE9push_backEc",
|
||||
"__ZNSt3__212basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw",
|
||||
"__ZNKSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4copyEPcmm",
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ describe("Lookahead iterator", () => {
|
|||
lookahead.delete();
|
||||
});
|
||||
|
||||
const expected = ["identifier", "comment", "(", "*", "formal_parameters"];
|
||||
const expected = ["identifier", "comment", "html_comment", "(", "*", "formal_parameters", "ERROR"];
|
||||
it("should iterate over valid symbols in the state", () => {
|
||||
const symbols = Array.from(lookahead);
|
||||
assert.includeMembers(symbols, expected);
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@ describe("Query", () => {
|
|||
|
||||
const matches = query.matches(tree.rootNode);
|
||||
assert.deepEqual(formatMatches(matches), [
|
||||
{ pattern: 0, captures: [{name: "name", text: "giraffe" }] },
|
||||
{ pattern: 0, captures: [{name: "name", text: "gross" }] },
|
||||
{ pattern: 0, captures: [{ name: "name", text: "giraffe" }] },
|
||||
{ pattern: 0, captures: [{ name: "name", text: "gross" }] },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
|
@ -124,12 +124,12 @@ describe("Query", () => {
|
|||
query = JavaScript.query(`
|
||||
(pair
|
||||
key: _ @method.def
|
||||
(function
|
||||
(function_expression
|
||||
name: (identifier) @method.alias))
|
||||
|
||||
(variable_declarator
|
||||
name: _ @function.def
|
||||
value: (function
|
||||
value: (function_expression
|
||||
name: (identifier) @function.alias))
|
||||
|
||||
":" @delimiter
|
||||
|
|
@ -256,7 +256,7 @@ describe("Query", () => {
|
|||
(array (identifier) @pre (identifier) @post)
|
||||
`);
|
||||
|
||||
const captures = query.captures(tree.rootNode, null, null, {matchLimit: 32});
|
||||
const captures = query.captures(tree.rootNode, null, null, { matchLimit: 32 });
|
||||
assert.ok(query.didExceedMatchLimit());
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue