Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Fix API tests with parameter undefined #44

Merged
merged 1 commit into from
Jul 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/common/apiTestRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,16 @@ export class ApiTestRunner {
let parameter: any = operationResults[para.resultType!][para.resultIndex!];
if (para.resultPath) {
for (const item of para.resultPath) {
parameter = parameter[item];
if (parameter) {
parameter = parameter[item];
} else {
return;
}
}
}
if (!parameter) {
return;
}
parameters.push(parameter);
}
}
Expand Down