Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Rijo Cedeno <[email protected]>
  • Loading branch information
zFernand0 committed Jan 15, 2025
1 parent 955da02 commit 3c3aee8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe("FtpJesApi", () => {

it("should throw error when list jobs by owner and prefix failed.", async () => {
jest.spyOn(JobUtils, "listJobs").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("List jobs failed.");
})
);
Expand All @@ -151,7 +151,7 @@ describe("FtpJesApi", () => {

it("should throw error when get job failed.", async () => {
jest.spyOn(JobUtils, "findJobByID").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Get jobs failed.");
})
);
Expand All @@ -162,7 +162,7 @@ describe("FtpJesApi", () => {

it("should throw error when get spool files failed.", async () => {
jest.spyOn(JobUtils, "findJobByID").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Get jobs failed.");
})
);
Expand All @@ -173,7 +173,7 @@ describe("FtpJesApi", () => {

it("should throw error when download spool contents failed.", async () => {
jest.spyOn(JobUtils, "findJobByID").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Get jobs failed.");
})
);
Expand All @@ -187,7 +187,7 @@ describe("FtpJesApi", () => {

it("should throw error when get spool contents by id failed.", async () => {
jest.spyOn(JobUtils, "getSpoolFileContent").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Get spool file content failed.");
})
);
Expand All @@ -198,7 +198,7 @@ describe("FtpJesApi", () => {

it("should throw error when submit job failed", async () => {
jest.spyOn(JobUtils, "submitJob").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Submit job failed.");
})
);
Expand All @@ -209,7 +209,7 @@ describe("FtpJesApi", () => {

it("should throw error when delete job failed", async () => {
jest.spyOn(JobUtils, "deleteJob").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Delete job failed.");
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe("FtpMvsApi", () => {
type: "file",
options: { encoding: "" },
};
jest.spyOn(FTPConfig, "connectFromArguments").mockImplementationOnce((val) => {
jest.spyOn(FTPConfig, "connectFromArguments").mockImplementationOnce((_val) => {
throw new Error("getContents example error");
});
await expect(async () => {
Expand Down Expand Up @@ -287,7 +287,7 @@ describe("FtpMvsApi", () => {

it("should throw error when list dataset failed", async () => {
jest.spyOn(DataSetUtils, "listDataSets").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("List dataset failed.");
})
);
Expand All @@ -298,7 +298,7 @@ describe("FtpMvsApi", () => {

it("should throw error when list dataset members failed", async () => {
jest.spyOn(DataSetUtils, "listMembers").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("List members failed.");
})
);
Expand All @@ -309,7 +309,7 @@ describe("FtpMvsApi", () => {

it("should throw error when get contents failed", async () => {
jest.spyOn(DataSetUtils, "downloadDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Download dataset failed.");
})
);
Expand All @@ -327,7 +327,7 @@ describe("FtpMvsApi", () => {

it("should throw error when put contents failed", async () => {
jest.spyOn(DataSetUtils, "uploadDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Upload dataset failed.");
})
);
Expand All @@ -344,7 +344,7 @@ describe("FtpMvsApi", () => {

it("should throw error when create dataset failed", async () => {
jest.spyOn(DataSetUtils, "allocateDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Allocate dataset failed.");
})
);
Expand All @@ -360,7 +360,7 @@ describe("FtpMvsApi", () => {

it("should throw error when create dataset member failed", async () => {
jest.spyOn(DataSetUtils, "uploadDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Upload dataset failed.");
})
);
Expand All @@ -376,7 +376,7 @@ describe("FtpMvsApi", () => {

it("should throw error when rename dataset failed", async () => {
jest.spyOn(DataSetUtils, "renameDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Rename dataset failed.");
})
);
Expand All @@ -387,7 +387,7 @@ describe("FtpMvsApi", () => {

it("should throw error when rename dataset member failed", async () => {
jest.spyOn(DataSetUtils, "renameDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Rename dataset failed.");
})
);
Expand All @@ -398,7 +398,7 @@ describe("FtpMvsApi", () => {

it("should throw error when delete dataset failed", async () => {
jest.spyOn(DataSetUtils, "deleteDataSet").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Delete dataset failed.");
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe("FtpUssApi", () => {

it("should throw error when list files failed", async () => {
jest.spyOn(UssUtils, "listFiles").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("List files failed.");
})
);
Expand Down Expand Up @@ -261,7 +261,7 @@ describe("FtpUssApi", () => {

it("should throw error when upload directory failed", async () => {
jest.spyOn(UssUtils, "uploadFile").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Upload file failed.");
})
);
Expand All @@ -277,7 +277,7 @@ describe("FtpUssApi", () => {

it("should throw error when create file failed", async () => {
jest.spyOn(UssUtils, "uploadFile").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Upload file failed.");
})
);
Expand All @@ -288,7 +288,7 @@ describe("FtpUssApi", () => {

it("should throw error when delete file failed", async () => {
jest.spyOn(UssUtils, "deleteFile").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Delete file failed.");
})
);
Expand All @@ -299,7 +299,7 @@ describe("FtpUssApi", () => {

it("should throw error when rename file failed", async () => {
jest.spyOn(UssUtils, "renameFile").mockImplementationOnce(
jest.fn((val) => {
jest.fn((_val) => {
throw new Error("Rename file failed.");
})
);
Expand Down
3 changes: 2 additions & 1 deletion packages/zowe-explorer/src/dataset/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@ export async function deleteDataset(node: api.IZoweTreeNode, datasetProvider: ap
}

datasetProvider.refreshElement(node.getSessionNode());
deleteTempFile(label, node);
}

/**
Expand Down Expand Up @@ -1877,7 +1878,7 @@ export async function copyName(node: api.IZoweDatasetTreeNode): Promise<void> {
await vscode.env.clipboard.writeText(node.label as string);
}
}
export async function deleteTempFile(label: string, node: api.IZoweDatasetTreeNode): Promise<void> {
export function deleteTempFile(label: string, node: api.IZoweDatasetTreeNode): void {
// remove local copy of file
const fileName = getDocumentFilePath(label, node);
try {
Expand Down

0 comments on commit 3c3aee8

Please sign in to comment.