vscode extention: fix oom with test explorer from too many files (#21744)

### What does this PR do?

Limit to only 5k test files for initial scan + ignore node_modules for
subdirs.

### How did you verify your code works?

manual
This commit is contained in:
Michael H
2025-08-10 21:36:04 -07:00
committed by GitHub
parent 35027a1399
commit 0b7a6024e0

View File

@@ -163,8 +163,11 @@ export class BunTestController implements vscode.Disposable {
const ignoreGlobs = await this.buildIgnoreGlobs(cancellationToken);
const tests = await vscode.workspace.findFiles(
this.customFilePattern(),
"node_modules",
undefined,
"**/node_modules/**",
// 5k tests is more than enough for most projects.
// If they need more, they can manually open the files themself and it should be added to the test explorer.
// This is needed because otherwise with too many tests, vscode OOMs.
5_000,
cancellationToken,
);