File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
packages/core/src/test/codewhisperer/commands Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828 zipCode ,
2929 getTableMapping ,
3030 getFilesRecursively ,
31+ getJobStatisticsHtml ,
3132} from '../../../codewhisperer/service/transformByQ/transformApiHandler'
3233import {
3334 validateOpenProjects ,
@@ -312,6 +313,31 @@ dependencyManagement:
312313 assert . deepStrictEqual ( actual , expected )
313314 } )
314315
316+ it ( 'WHEN showing plan statistics THEN correct labels appear' , ( ) => {
317+ const mockJobStatistics = [
318+ {
319+ name : 'linesOfCode' ,
320+ value : '1000' ,
321+ } ,
322+ {
323+ name : 'plannedDependencyChanges' ,
324+ value : '5' ,
325+ } ,
326+ {
327+ name : 'plannedDeprecatedApiChanges' ,
328+ value : '10' ,
329+ } ,
330+ {
331+ name : 'plannedFileChanges' ,
332+ value : '7' ,
333+ } ,
334+ ]
335+ const result = getJobStatisticsHtml ( mockJobStatistics )
336+ assert . strictEqual ( result . includes ( 'Lines of code in your application' ) , true )
337+ assert . strictEqual ( result . includes ( 'to be replaced' ) , false )
338+ assert . strictEqual ( result . includes ( 'to be changed' ) , false )
339+ } )
340+
315341 it ( `WHEN transforming a project with a Windows Maven executable THEN mavenName set correctly` , async function ( ) {
316342 sinon . stub ( env , 'isWin' ) . returns ( true )
317343 const tempFileName = 'mvnw.cmd'
You can’t perform that action at this time.
0 commit comments