Skip to content

Commit 74af332

Browse files
committed
fix tests
fix tests Revert "fix tests" This reverts commit 7be374d.
1 parent 64f851c commit 74af332

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/autocomplete/context/static-context/StaticContextService.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from "path";
22
import { pathToFileURL } from "url";
33
import Parser from "web-tree-sitter";
4-
import { FileType, IDE, Position } from "../../..";
4+
import { FileType, IDE, Position } from "../../../";
55
import { localPathOrUriToPath } from "../../../util/pathToUri";
66
import { getFullLanguageName, getQueryForFile } from "../../../util/treeSitter";
77
import {
@@ -854,15 +854,14 @@ export class StaticContextService {
854854
try {
855855
const currentUri = pathToFileURL(currentPath).toString();
856856
const entries = await this.ide.listDir(currentUri);
857-
858857
for (const [name, fileType] of entries) {
859858
const fullPath = localPathOrUriToPath(path.join(currentPath, name));
860859

861-
if (fileType === FileType.Directory) {
860+
if (fileType === (2 as FileType.Directory)) {
862861
if (!shouldSkipDirectory(name)) {
863862
await scanRecursively(fullPath);
864863
}
865-
} else if (fileType === FileType.File) {
864+
} else if (fileType === (1 as FileType.File)) {
866865
const extension = path.extname(name).toLowerCase();
867866
if (tsExtensions.includes(extension)) {
868867
tsFiles.push(fullPath);

0 commit comments

Comments
 (0)