Skip to content

Commit

Permalink
reformat and feat: added some comments, exporting SpecResult type fro…
Browse files Browse the repository at this point in the history
…m module
  • Loading branch information
Varun0157 committed Jun 2, 2024
1 parent d4aa3a8 commit 91d2971
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export { RequestPosition, ResponseData, RequestSpec, GotRequest, TestResult } from "./models";
export {
RequestPosition,
ResponseData,
RequestSpec,
GotRequest,
TestResult,
SpecResult,
} from "./models";

export { getRequestPositions, getAllRequestSpecs, getRequestSpec } from "./parseBundle";

Expand Down
3 changes: 2 additions & 1 deletion src/runTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function runObjectTests(opVals: { [key: string]: any }, receivedObject: any, spe
try {
expected = JSON.parse(expected);

// the spec remains the same
// the spec remains the same, so we add it to the current layer
const res = runObjectTests(expected, receivedLen, spec);
objRes.results.push(...res.results);
objRes.subResults.push(...res.subResults);
Expand Down Expand Up @@ -161,6 +161,7 @@ function runObjectTests(opVals: { [key: string]: any }, receivedObject: any, spe
json: receivedObject,
};

// the spec remains the same, so we add it to the current layer
const res = runAllTests(recursiveTests, receivedObj, false, spec);
objRes.results.push(...res.results);
objRes.subResults.push(...res.subResults);
Expand Down

0 comments on commit 91d2971

Please sign in to comment.