feat(web)!: use bigint for timeouts

This commit is contained in:
ObserverOfTime 2025-08-30 15:54:17 +03:00 committed by Amaan Qureshi
parent 0c5cdcb161
commit dba8446d9e
5 changed files with 27 additions and 28 deletions

View file

@ -465,9 +465,9 @@ describe('Query', () => {
it('returns less than the expected matches', { timeout: 10000 }, () => {
tree = parser.parse('function foo() while (true) { } }\n'.repeat(1000))!;
query = new Query(JavaScript, '(function_declaration name: (identifier) @function)');
const matches = query.matches(tree.rootNode, { timeoutMicros: 1000 });
const matches = query.matches(tree.rootNode, { timeoutMicros: 1000n });
expect(matches.length).toBeLessThan(1000);
const matches2 = query.matches(tree.rootNode, { timeoutMicros: 0 });
const matches2 = query.matches(tree.rootNode, { timeoutMicros: 0n });
expect(matches2).toHaveLength(1000);
});
});