Skip to content

Commit 8546571

Browse files
authored
Small unit test bug fixes (#1308)
1 parent dae3538 commit 8546571

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@
15341534
"scope": "resource",
15351535
"items": {
15361536
"type": "string",
1537-
"pattern": "^([\\p{L}\\d_. -]+([\\/\\\\][\\p{L}\\d_. -]*))?$",
1537+
"pattern": "^([\\p{L}\\d_. -]+([\\/\\\\][\\p{L}\\d_. -]+)*)?$",
15381538
"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."
15391539
}
15401540
},

src/commands/unitTest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ async function runHandler(
518518
});
519519
if (test.parent.uri.scheme == "file") {
520520
// Add this class to the list to load
521+
if (asyncRequest.load == undefined) asyncRequest.load = [];
521522
asyncRequest.load.push({
522523
file: test.parent.uri.fsPath,
523524
content: textDecoder.decode(await vscode.workspace.fs.readFile(test.parent.uri)).split(/\r?\n/),
@@ -554,6 +555,7 @@ async function runHandler(
554555
}
555556
if (test.uri.scheme == "file") {
556557
// Add this class to the list to load
558+
if (asyncRequest.load == undefined) asyncRequest.load = [];
557559
asyncRequest.load.push({
558560
file: test.uri.fsPath,
559561
content: textDecoder.decode(await vscode.workspace.fs.readFile(test.uri)).split(/\r?\n/),

0 commit comments

Comments
 (0)