Skip to content

Commit dae3538

Browse files
authored
Don't create unit test items in workspace folders that don't support running tests (#1307)
1 parent 2e15ff7 commit dae3538

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/unitTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ async function getTestItemForClass(
223223
): Promise<vscode.TestItem | undefined> {
224224
let item: vscode.TestItem;
225225
const rootItem = rootItemForItem(testController, uri);
226-
if (rootItem) {
226+
if (rootItem && !rootItem.error) {
227227
// Walk the directory path until we reach a dead end or the TestItem for this class
228228
let docPath = uri.path.slice(rootItem.uri.path.length);
229229
docPath = docPath.startsWith("/") ? docPath.slice(1) : docPath;

0 commit comments

Comments
 (0)