Skip to content

Commit

Permalink
Remove extra logging from watchHistory.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Nov 19, 2024
1 parent fc98086 commit 381f363
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/store/historyStore/model/watchHistory.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import MockAdapter from "axios-mock-adapter";
import { createPinia, mapState } from "pinia";
import { useHistoryItemsStore } from "stores/historyItemsStore";
import { useHistoryStore } from "stores/historyStore";
import { suppressDebugConsole } from "tests/jest/helpers";

import { watchHistoryOnce } from "./watchHistory";

Expand Down Expand Up @@ -77,6 +78,8 @@ describe("watchHistory", () => {
});

it("survives a failing request", async () => {
suppressDebugConsole(); // we log that 500, totally expected, do not include it in test output

// Setup a failing request, then update history content
axiosMock
.onGet(`/history/current_history_json`)
Expand All @@ -92,7 +95,6 @@ describe("watchHistory", () => {
try {
await watchHistoryOnce();
} catch (error) {
console.log(error);
expect(error.message).toContain("500");
}
// Need to reset axios mock here. Smells like a bug,
Expand Down

0 comments on commit 381f363

Please sign in to comment.