From 8ab14a0ee5128a49648e0904b122ecb7e6aa2d3f Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Fri, 2 Feb 2024 11:30:19 -0500 Subject: [PATCH] fix(node): update tests --- lib/binding_web/exports.json | 1 - lib/binding_web/test/language-test.js | 2 +- lib/binding_web/test/query-test.js | 10 +++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/binding_web/exports.json b/lib/binding_web/exports.json index dfc9ff54..3cf8565d 100644 --- a/lib/binding_web/exports.json +++ b/lib/binding_web/exports.json @@ -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", diff --git a/lib/binding_web/test/language-test.js b/lib/binding_web/test/language-test.js index 394e32b4..467b56c5 100644 --- a/lib/binding_web/test/language-test.js +++ b/lib/binding_web/test/language-test.js @@ -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); diff --git a/lib/binding_web/test/query-test.js b/lib/binding_web/test/query-test.js index 34fd5cd1..f53b8d15 100644 --- a/lib/binding_web/test/query-test.js +++ b/lib/binding_web/test/query-test.js @@ -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()); });