forked from JayPNanduri/ast-cli-javascript-wrapper-jay
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLearnMoreDescriptions.test.ts
More file actions
23 lines (20 loc) · 1.03 KB
/
LearnMoreDescriptions.test.ts
File metadata and controls
23 lines (20 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import {BaseTest} from "./BaseTest";
import {CxCommandOutput} from "../main/wrapper/CxCommandOutput";
import CxWrapperFactory from "../main/wrapper/CxWrapperFactory";
const cxWrapperFactory = new CxWrapperFactory();
describe("LearnMoreDescriptions cases",() => {
const cxScanConfig = new BaseTest();
it('LearnMoreDescriptions Successful case', async () => {
const auth = await cxWrapperFactory.createWrapper(cxScanConfig);
const queryId = process.env.CX_TEST_QUERY_ID;
const data = await auth.learnMore(queryId !== undefined? queryId : "16772998409937314312")
const cxCommandOutput: CxCommandOutput = data;
expect(cxCommandOutput.payload.length).toBeGreaterThan(0);
})
it('LearnMoreDescriptions Failure case', async () => {
const auth = await cxWrapperFactory.createWrapper(cxScanConfig);
const data = await auth.learnMore("")
const cxCommandOutput: CxCommandOutput = data;
expect(cxCommandOutput.status).toBe("Value of query-id is invalid\n");
})
})