feat(web)!: use bigint for timeouts
This commit is contained in:
parent
0c5cdcb161
commit
dba8446d9e
5 changed files with 27 additions and 28 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue