Skip to content

Commit 9f150e0

Browse files
authored
Replace Debug.checkDefined to avoid redundant debugger stops (#60009)
1 parent 49ad1a3 commit 9f150e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,11 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost,
11581158

11591159
// base folder has to be present
11601160
const base = getDirectoryPath(file.path);
1161-
const folder = Debug.checkDefined(this.getRealFolder(base));
1161+
const folder = this.getRealFolder(base);
1162+
1163+
if (!folder) {
1164+
throw new Error(`Directory not found: ${base}`);
1165+
}
11621166

11631167
if (folder.path === base) {
11641168
if (!this.fs.has(file.path)) {

0 commit comments

Comments
 (0)