From 62cbbee7c585445398d26914934e89849f727d23 Mon Sep 17 00:00:00 2001 From: Brett Saviano Date: Fri, 2 Feb 2024 11:47:17 -0500 Subject: [PATCH] Small unit test bug fixes --- package.json | 2 +- src/commands/unitTest.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 346b1d0e..17ea657f 100644 --- a/package.json +++ b/package.json @@ -1534,7 +1534,7 @@ "scope": "resource", "items": { "type": "string", - "pattern": "^([\\p{L}\\d_. -]+([\\/\\\\][\\p{L}\\d_. -]*))?$", + "pattern": "^([\\p{L}\\d_. -]+([\\/\\\\][\\p{L}\\d_. -]+)*)?$", "patternErrorMessage": "Each folder name can only contain letters, digits, space, hyphen ('-'), period ('.'), or underscore ('_'), and the full path must neither begin nor end with a slash." } }, diff --git a/src/commands/unitTest.ts b/src/commands/unitTest.ts index 5e4bcf78..f6c7b933 100644 --- a/src/commands/unitTest.ts +++ b/src/commands/unitTest.ts @@ -518,6 +518,7 @@ async function runHandler( }); if (test.parent.uri.scheme == "file") { // Add this class to the list to load + if (asyncRequest.load == undefined) asyncRequest.load = []; asyncRequest.load.push({ file: test.parent.uri.fsPath, content: textDecoder.decode(await vscode.workspace.fs.readFile(test.parent.uri)).split(/\r?\n/), @@ -554,6 +555,7 @@ async function runHandler( } if (test.uri.scheme == "file") { // Add this class to the list to load + if (asyncRequest.load == undefined) asyncRequest.load = []; asyncRequest.load.push({ file: test.uri.fsPath, content: textDecoder.decode(await vscode.workspace.fs.readFile(test.uri)).split(/\r?\n/),