@@ -155,18 +155,26 @@ chain.add('uncaught exception', function() {
155155chain . add ( 'coverage' , function ( ) {
156156 tr . options . coverage = true ;
157157 tr . run ( {
158- code : fixtures + '/testrunner -code.js' ,
159- tests : fixtures + '/testrunner-tests .js' ,
158+ code : fixtures + '/coverage -code.js' ,
159+ tests : fixtures + '/coverage-test .js'
160160 } , function ( err , res ) {
161- var coverage = {
161+ var stat = {
162162 files : 1 ,
163- statements : { covered : 4 , total : 5 } ,
164- branches : { covered : 0 , total : 0 } ,
165- functions : { covered : 2 , total : 3 } ,
166- lines : { covered : 4 , total : 5 }
163+ tests : 2 ,
164+ assertions : 3 ,
165+ failed : 0 ,
166+ passed : 3 ,
167+ coverage : {
168+ files : 1 ,
169+ statements : { covered : 6 , total : 7 } ,
170+ branches : { covered : 0 , total : 0 } ,
171+ functions : { covered : 3 , total : 4 } ,
172+ lines : { covered : 6 , total : 7 }
173+ }
167174 } ;
175+ delete res . runtime ;
168176 a . equal ( err , null , 'no errors' ) ;
169- a . deepEqual ( coverage , res . coverage , 'Coverage calculated ' ) ;
177+ a . deepEqual ( stat , res , 'coverage code testing works ' ) ;
170178 chain . next ( ) ;
171179 } ) ;
172180} ) ;
@@ -176,4 +184,3 @@ chain.add(function() {
176184} ) ;
177185
178186chain . start ( ) ;
179-
0 commit comments