Skip to content

Commit

Permalink
fix failing jobs test
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Nov 14, 2024
1 parent 72647f0 commit 3d7661f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import { Disposable, FilePermission, FileType, Uri, window } from "vscode";
import { FsJobsUtils, FilterEntry, Gui, JobEntry, SpoolEntry, ZoweScheme } from "@zowe/zowe-explorer-api";
import { FsJobsUtils, FilterEntry, Gui, JobEntry, SpoolEntry, ZoweScheme, imperative } from "@zowe/zowe-explorer-api";
import { createIProfile } from "../../../__mocks__/mockCreators/shared";
import { createIJobFile, createIJobObject } from "../../../__mocks__/mockCreators/jobs";
import { ZoweExplorerApiRegister } from "../../../../src/extending/ZoweExplorerApiRegister";
Expand Down Expand Up @@ -249,7 +249,10 @@ describe("fetchSpoolAtUri", () => {
.mockReturnValueOnce({ ...testEntries.spool, data: new Uint8Array() });
const mockJesApi = {
downloadSingleSpool: jest.fn((opts) => {
throw new Error("Failed to download spool");
throw new imperative.ImperativeError({
msg: "Failed to download spool",
errorCode: "401",
});
}),
};
const promptForAuthErrorMock = jest.spyOn(AuthUtils, "promptForAuthError").mockImplementation();
Expand Down

0 comments on commit 3d7661f

Please sign in to comment.