Skip to content

Commit

Permalink
test(wrappednodefetch): updating checks
Browse files Browse the repository at this point in the history
updating test cases

test #354

Signed-off-by: Hermione Dadheech <[email protected]>
  • Loading branch information
Hermione2408 committed Mar 14, 2023
1 parent ff354ac commit b1066bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/wrappedNodeFetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ describe('wrappedNodeFetch', () => {
};
const response = await wrappedFetch(url, options);
const updatedctx= getExecutionContext().context;
const mocks=updatedctx.mocks.length;
const deps=updatedctx.deps.length;
const responseBody = await response.text();
const recordedOutput = updatedctx.mocks[0].Spec.Res.Body;
expect(response).toBeInstanceOf(Response);
expect(mocks).toBeGreaterThan(0);
expect(deps).toBeGreaterThan(0);
expect(updatedctx.mocks.length).toBeGreaterThan(0);
expect(updatedctx.deps.length).toBeGreaterThan(0);
expect(response).toHaveProperty('body');
expect(responseBody).toEqual(recordedOutput);
});
Expand Down

0 comments on commit b1066bc

Please sign in to comment.