MCPcopy Create free account
hub / github.com/facebook/pyrefly / parseRunTestArgs

Function parseRunTestArgs

lsp/src/codeLens.ts:67–81  ·  view source on GitHub ↗
(args: unknown)

Source from the content-addressed store, hash-verified

65}
66
67function parseRunTestArgs(args: unknown): RunTestArgs | undefined {
68 const parsed = asObject(args);
69 if (!parsed) {
70 return undefined;
71 }
72 return {
73 uri: typeof parsed.uri === 'string' ? parsed.uri : undefined,
74 cwd: typeof parsed.cwd === 'string' ? parsed.cwd : undefined,
75 position: parsePosition(parsed.position),
76 testName: typeof parsed.testName === 'string' ? parsed.testName : undefined,
77 className: typeof parsed.className === 'string' ? parsed.className : undefined,
78 isUnittest:
79 typeof parsed.isUnittest === 'boolean' ? parsed.isUnittest : undefined,
80 };
81}
82
83function parseUri(rawUri: string | undefined): vscode.Uri | undefined {
84 if (!rawUri) {

Callers 1

registerCodeLensCommandsFunction · 0.85

Calls 2

asObjectFunction · 0.85
parsePositionFunction · 0.85

Tested by

no test coverage detected