diff --git a/src/index.ts b/src/index.ts index 1302290..422471a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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"; diff --git a/src/runTests.ts b/src/runTests.ts index 11886a6..6a4bbe4 100644 --- a/src/runTests.ts +++ b/src/runTests.ts @@ -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); @@ -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);