Skip to content

Commit 586fa7c

Browse files
committed
Update versions, fix tests
Signed-off-by: Andrew W. Harn <[email protected]>
1 parent dde77cf commit 586fa7c

File tree

6 files changed

+1422
-1037
lines changed

6 files changed

+1422
-1037
lines changed

__tests__/cli/list/ListBaseHandler.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
*/
1010

1111
import { mockHandlerParameters } from "@zowe/cli-test-utils";
12-
import { IHandlerParameters, ISession } from "@zowe/imperative";
12+
import { IHandlerParameters, Imperative, ImperativeConfig, ISession } from "@zowe/imperative";
1313
import { ListBaseHandler } from "../../../src/cli/list/ListBaseHandler";
14+
import { homedir } from "os";
15+
import { join } from "path";
1416

1517
class ListTestHandler extends ListBaseHandler {
1618
public async processWithSession(params: IHandlerParameters, session: any): Promise<void> {
@@ -30,6 +32,9 @@ describe("ListBaseHandler", () => {
3032
testHandler.processWithSession = jest.fn().mockImplementation((params, session) => {
3133
finalSessCfg = session.ISession;
3234
});
35+
const imperativeConfig = new ImperativeConfig();
36+
jest.spyOn(imperativeConfig, "cliHome", "get").mockReturnValue(join(homedir(), ".zowe"));
37+
jest.spyOn(ImperativeConfig, "instance", "get").mockReturnValue(imperativeConfig);
3338
});
3439

3540
afterEach(() => {

__tests__/cli/list/__snapshots__/List.definition.test.ts.snap

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,24 @@ For this command, we list contents of the specified directory.",
9999
"name": "cert-key-file",
100100
"type": "existingLocalFile",
101101
},
102+
Object {
103+
"aliases": Array [
104+
"cto",
105+
],
106+
"description": "The amount in time, in seconds, a REST operation should wait to complete before timing out",
107+
"group": "Zosmf Connection Options",
108+
"name": "completion-timeout",
109+
"type": "number",
110+
},
111+
Object {
112+
"aliases": Array [
113+
"ecto",
114+
],
115+
"description": "The amount of time, in seconds, a REST operation should wait while connecting to the server before timing out",
116+
"group": "Zosmf Connection Options",
117+
"name": "establish-connection-timeout",
118+
"type": "number",
119+
},
102120
],
103121
"positionals": Array [
104122
Object {

__tests__/cli/list/directory-contents/__snapshots__/DirectoryContents.definition.test.ts.snap

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,24 @@ For this command, we list contents of the specified directory.",
9898
"name": "cert-key-file",
9999
"type": "existingLocalFile",
100100
},
101+
Object {
102+
"aliases": Array [
103+
"cto",
104+
],
105+
"description": "The amount in time, in seconds, a REST operation should wait to complete before timing out",
106+
"group": "Zosmf Connection Options",
107+
"name": "completion-timeout",
108+
"type": "number",
109+
},
110+
Object {
111+
"aliases": Array [
112+
"ecto",
113+
],
114+
"description": "The amount of time, in seconds, a REST operation should wait while connecting to the server before timing out",
115+
"group": "Zosmf Connection Options",
116+
"name": "establish-connection-timeout",
117+
"type": "number",
118+
},
101119
],
102120
"positionals": Array [
103121
Object {

__tests__/cli/list/profile-args/ProfileArgs.handler.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ describe("profile-args Handler", () => {
3232
get: jest.fn()
3333
},
3434
secure: {
35-
secureFields: jest.fn(() => [])
35+
secureFields: jest.fn(() => []),
36+
findSecure: jest.fn(() => [])
3637
}
3738
},
3839
exists: true,
@@ -41,13 +42,14 @@ describe("profile-args Handler", () => {
4142
base: "fakeBase",
4243
sample: "fakeSample"
4344
}
44-
}
45+
},
46+
mProperties: {}
4547
},
4648
envVariablePrefix: "TEST",
4749
loadedConfig: {
4850
profiles: []
49-
}
50-
})
51+
},
52+
}),
5153
});
5254
const profileArgs = {
5355
host: "fakeHost",

0 commit comments

Comments
 (0)