testing: better approach to deserializing test items

This commit is contained in:
Connor Peet
2022-03-31 10:25:09 -07:00
parent 93d5dd8b68
commit 804dc2f7de
3 changed files with 27 additions and 24 deletions

View File

@@ -17,7 +17,7 @@ import { generateUuid } from 'vs/base/common/uuid';
import { ExtHostTestingShape, ILocationDto, MainContext, MainThreadTestingShape } from 'vs/workbench/api/common/extHost.protocol';
import { ExtHostCommands } from 'vs/workbench/api/common/extHostCommands';
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import { ExtHostTestItemCollection, TestItemImpl, TestItemRootImpl } from 'vs/workbench/api/common/extHostTestItem';
import { ExtHostTestItemCollection, TestItemImpl, TestItemRootImpl, toItemFromContext } from 'vs/workbench/api/common/extHostTestItem';
import * as Convert from 'vs/workbench/api/common/extHostTypeConverters';
import { TestRunProfileKind, TestRunRequest } from 'vs/workbench/api/common/extHostTypes';
import { TestId, TestIdPathParts, TestPosition } from 'vs/workbench/contrib/testing/common/testId';
@@ -48,7 +48,7 @@ export class ExtHostTesting implements ExtHostTestingShape {
commands.registerArgumentProcessor({
processArgument: arg =>
arg?.$mid === MarshalledId.TestItemContext ? Convert.TestItem.toItemFromContext(arg) : arg,
arg?.$mid === MarshalledId.TestItemContext ? toItemFromContext(arg) : arg,
});
}