Skip to content

Commit

Permalink
Cut down on unneeded things in blockMocks
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Chung <[email protected]>
  • Loading branch information
JasonIBM committed Nov 13, 2023
1 parent b7663b1 commit 971e0e8
Showing 1 changed file with 1 addition and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3734,39 +3734,12 @@ describe("Dataset Actions Unit Tests - Function allocateLike", () => {

describe("Dataset Actions Unit Tests - Function confirmJobSubmission", () => {
function createBlockMocks() {
const session = createISession();
const imperativeProfile = createIProfile();
const treeView = createTreeView();
const datasetSessionNode = createDatasetSessionNode(session, imperativeProfile);
const testDatasetTree = createDatasetTree(datasetSessionNode, treeView);
const testNode = new ZoweDatasetNode("nodePDS", vscode.TreeItemCollapsibleState.None, datasetSessionNode, null);
const testSDSNode = new ZoweDatasetNode("nodeSDS", vscode.TreeItemCollapsibleState.None, datasetSessionNode, null);
const profileInstance = createInstanceOfProfile(imperativeProfile);
const mvsApi = createMvsApi(imperativeProfile);

bindMvsApi(mvsApi);
testNode.contextValue = globals.DS_PDS_CONTEXT;
testSDSNode.contextValue = globals.DS_DS_CONTEXT;

mocked(Profiles.getInstance).mockReturnValue(profileInstance);
mocked(vscode.window.showInputBox).mockImplementation((options) => {
options.validateInput("test");
return Promise.resolve("test");
});
jest.spyOn(datasetSessionNode, "getChildren").mockResolvedValue([testNode, testSDSNode]);
testDatasetTree.createFilterString.mockReturnValue("test");

return {
session,
treeView,
testNode,
testSDSNode,
profileInstance,
imperativeProfile,
datasetSessionNode,
mvsApi,
testDatasetTree,
};
return {};
}
it("Should use use local JCL doc name for confirmJobSubmission", async () => {
createGlobalMocks();
Expand Down

0 comments on commit 971e0e8

Please sign in to comment.