testing: adopt optional value standard

For #124362
This commit is contained in:
Connor Peet
2021-10-22 12:46:51 -07:00
parent 2ada30a9ec
commit baa380d17b
4 changed files with 18 additions and 16 deletions

View File

@@ -1728,6 +1728,8 @@ export namespace TestItem {
export function toPlain(item: ITestItem): Omit<vscode.TestItem, 'children' | 'invalidate' | 'discoverChildren'> {
return {
parent: undefined,
error: undefined,
id: TestId.fromString(item.extId).localId,
label: item.label,
uri: URI.revive(item.uri),

View File

@@ -3328,9 +3328,9 @@ export enum TestRunProfileKind {
@es5ClassCompat
export class TestRunRequest implements vscode.TestRunRequest {
constructor(
public readonly include?: vscode.TestItem[],
public readonly exclude?: vscode.TestItem[] | undefined,
public readonly profile?: vscode.TestRunProfile,
public readonly include: vscode.TestItem[] | undefined = undefined,
public readonly exclude: vscode.TestItem[] | undefined = undefined,
public readonly profile: vscode.TestRunProfile | undefined = undefined,
) { }
}