Skip to content

Commit

Permalink
PYIC-7329: Change .reset() to resetHistory for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeCollingwood committed Nov 11, 2024
1 parent 7290d31 commit 8457f34
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/credential-issuer/middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("credential issuer middleware", () => {
beforeEach(() => {
next.resetHistory();
coreBackServiceStub.postCriCallback.resolves({});
ipvMiddlewareStub.handleBackendResponse.reset();
ipvMiddlewareStub.handleBackendResponse.resetHistory();
});

(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe("handle update details/COI form checkbox", () => {

beforeEach(() => {
next.resetHistory();
coreBackServiceStub.getProvenIdentityUserDetails.reset();
coreBackServiceStub.getProvenIdentityUserDetails.resetHistory();
});

const updateDetailsPageTestCases = [
Expand Down
2 changes: 1 addition & 1 deletion src/app/ipv/tests/handleJourneyPageRequest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("handleJourneyPageRequest", () => {

beforeEach(() => {
next.resetHistory();
coreBackServiceStub.getProvenIdentityUserDetails.reset();
coreBackServiceStub.getProvenIdentityUserDetails.resetHistory();
});

context("handling page-ipv-reuse journey route", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/ipv/tests/processAction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ describe("processAction", () => {
);

beforeEach(() => {
coreBackServiceStub.postJourneyEvent.reset();
coreBackServiceStub.postAction.reset();
coreBackServiceStub.postJourneyEvent.resetHistory();
coreBackServiceStub.postAction.resetHistory();
});

it("should throw an error when receiving an unexpected backend response", async function () {
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/error-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("Error handlers", () => {

beforeEach(() => {
next.resetHistory();
axiosStub.isAxiosError.reset();
axiosStub.isAxiosError.resetHistory();
});

describe("pageNotFoundHandler", () => {
Expand Down

0 comments on commit 8457f34

Please sign in to comment.