Skip to content

Commit

Permalink
Hopefully fix unit test on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Johnson <[email protected]>
  • Loading branch information
t1m0thyj committed Jul 9, 2024
1 parent aacb094 commit e22db34
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,6 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => {
const imperativeProfile = createIProfile();
const datasetSessionNode = createDatasetSessionNode(session, imperativeProfile);
const textDocument = createTextDocument("HLQ.TEST.AFILE(mem)", datasetSessionNode);
(textDocument.languageId as any) = "jcl";
(textDocument.uri.fsPath as any) = "/user/temp/textdocument.txt";
const profileInstance = createInstanceOfProfile(imperativeProfile);
const jesApi = createJesApi(imperativeProfile);
const mockCheckCurrentProfile = jest.fn();
Expand Down Expand Up @@ -652,7 +650,7 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => {
expect(showMessagespy).toBeCalledWith("No profiles available");
});
it("Getting session name from the path itself", async () => {
globals.defineGlobals("/user/");
globals.defineGlobals(__dirname);
createGlobalMocks();
const blockMocks: any = createBlockMocks();
mocked(zowe.ZosmfSession.createSessCfgFromArgs).mockReturnValue(blockMocks.session);
Expand All @@ -663,6 +661,7 @@ describe("Jobs Actions Unit Tests - Function submitJcl", () => {
blockMocks.datasetSessionNode,
]);
blockMocks.textDocument.fileName = path.join(globals.USS_DIR, "lpar1_zosmf", "file.txt");
blockMocks.textDocument.uri = vscode.Uri.file(blockMocks.textDocument.fileName);
activeTextEditorDocument.mockReturnValue(blockMocks.textDocument);
const submitJclSpy = jest.spyOn(blockMocks.jesApi, "submitJcl");
submitJclSpy.mockClear();
Expand Down

0 comments on commit e22db34

Please sign in to comment.