Skip to content

Commit

Permalink
feat: still displaying tests in case of skipping a spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Varun0157 committed Jun 4, 2024
1 parent 11cb3cc commit 67c2bfa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/runTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function runAllTests(
tests: Tests,
responseData: ResponseData,
stopOnFailure: boolean,
rootSpec: string | null = null,
rootSpec: string | null = null
): SpecResult {
const res: SpecResult = { spec: rootSpec, results: [], subResults: [] };
if (!tests) return res;
Expand Down Expand Up @@ -80,10 +80,7 @@ function getValueForJSONTests(responseContent: object, key: string): any {

function runObjectTests(opVals: { [key: string]: any }, receivedObject: any, spec: string): SpecResult {
let objRes: SpecResult = { spec, results: [], subResults: [] };
if (opVals["$skip"]) {
objRes.skipped = true;
return objRes;
}
if (opVals["$skip"]) objRes.skipped = true;

for (const op in opVals) {
let expected = getStringIfNotScalar(opVals[op]);
Expand Down

0 comments on commit 67c2bfa

Please sign in to comment.