Skip to content

Commit a2e0e68

Browse files
committed
More
1 parent 120fe61 commit a2e0e68

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

src/tests/Oss.test.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/tests/ScanTest.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,13 @@ describe("ScanCreate cases", () => {
166166
expect(Number.isInteger(scanObject.scanDetails[0].line)).toBe(true);
167167
expect(typeof scanObject.scanDetails[0].description).toBe('string');
168168
});
169+
170+
it('ScanOss Successful case', async () => {
171+
const auth = new CxWrapper(cxScanConfig);
172+
const cxCommandOutput: CxCommandOutput = await auth.scanOSS("tsc/tests/data/python-vul-file.py");
173+
console.log("Json object from scanOSS successful case: " + JSON.stringify(cxCommandOutput));
174+
expect(cxCommandOutput.payload).toBeDefined();
175+
expect(cxCommandOutput.exitCode).toBe(0);
176+
});
169177

170178
});

tsc/tests/data/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "test",
3+
"version": "0.0.1",
4+
"description": "AST CLI Javascript wrapper tests",
5+
"dependencies": {
6+
"log4js": "^6.9.1"
7+
}
8+
}

0 commit comments

Comments
 (0)