@@ -7,19 +7,19 @@ describe("ScanCreate cases",() => {
77 let cxScanConfig = new BaseTest ( ) ;
88 it ( 'ScanList Successful case' , async ( ) => {
99 const auth = new CxWrapper ( cxScanConfig ) ;
10- let cxCommandOutput : CxCommandOutput = await auth . scanList ( "" ) ;
11- cxCommandOutput = await auth . scanList ( "" ) ;
12- expect ( cxCommandOutput . payload . length ) . toBeGreaterThan ( 0 ) ;
10+ auth . scanList ( "" ) . then ( ( res ) => {
11+ expect ( res . payload . length ) . toBeGreaterThan ( 0 ) ;
12+ } ) ;
1313 } ) ;
14+
1415 it ( 'ScanCreate Successful case wait mode' , async ( ) => {
1516 const params = new Map ( ) ;
1617 params . set ( CxParamType . PROJECT_NAME , "ast-cli-javascript-integration-success" ) ;
1718 params . set ( CxParamType . S , "./src" ) ;
1819 params . set ( CxParamType . FILTER , "*.ts,!**/node_modules/**/*" ) ;
1920 params . set ( CxParamType . BRANCH , "master" ) ;
2021 const auth = new CxWrapper ( cxScanConfig ) ;
21- const data = await auth . scanCreate ( params ) ;
22- const cxCommandOutput : CxCommandOutput = data ;
22+ const cxCommandOutput : CxCommandOutput = await auth . scanCreate ( params ) ;
2323 const scanObject = cxCommandOutput . payload . pop ( ) ;
2424 const scanShowObject = await auth . scanShow ( scanObject . ID ) ;
2525 console . log ( " Json object from successful wait mode case: " + JSON . stringify ( scanShowObject ) ) ;
0 commit comments