Skip to content

Commit

Permalink
fix: add RunTestResult type (#395)
Browse files Browse the repository at this point in the history
* fix: add RunTestResult type

* chore: make codeCoverageWarnings optional

Co-authored-by: Steve Hetzel <shetzel@salesforce.com>
  • Loading branch information
WillieRuemmele and shetzel authored Jul 23, 2021
1 parent 13b4742 commit d9d768f
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions src/client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,61 @@ export interface MetadataApiDeployStatus extends MetadataRequestStatus {
export type DeployDetails = {
componentFailures?: DeployMessage | DeployMessage[];
componentSuccesses?: DeployMessage | DeployMessage[];
// TODO: Add types for RetrieveResult and RunTestsResult
// TODO: Add types for RetrieveResult
// retrieveResult?:
// runTestResult?:
runTestResult?: RunTestResult;
};

export interface RunTestResult {
codeCoverage?: CodeCoverage[] | CodeCoverage;
codeCoverageWarnings?: CodeCoverageWarnings[] | CodeCoverageWarnings;
failures?: Failures[] | Failures;
numFailures: string;
numTestsRun: string;
successes?: Successes[] | Successes;
totalTime: string;
}

export interface CodeCoverage {
id: string;
locationsNotCovered?: LocationsNotCovered[] | LocationsNotCovered;
name: string;
numLocations: string;
numLocationsNotCovered: string;
type: string;
}

export interface LocationsNotCovered {
column: string;
line: string;
numExecutions: string;
time: string;
}

export interface CodeCoverageWarnings {
id: string;
message: string;
namespace: string;
}

export interface Failures {
id: string;
message: string;
methodName: string;
name: string;
packageName: string;
stackTrace: string;
time: string;
type: string;
}

export interface Successes {
id: string;
methodName: string;
name: string;
time: string;
}

type BooleanString = 'true' | 'false' | true | false;

export type DeployMessage = {
Expand Down

0 comments on commit d9d768f

Please sign in to comment.