@@ -12,10 +12,30 @@ test('empty project', function (t) {
1212} ) ;
1313
1414test ( 'example project' , function ( t ) {
15- analyze ( JSON . parse ( data . example . json . toString ( ) ) , function ( err , project ) {
15+ analyze ( JSON . parse ( data . example . json . toString ( ) ) , function ( err , res ) {
1616 t . equal ( err , null ) ;
17- t . type ( project , 'object' ) ;
18- t . type ( project . _meta , 'object' ) ;
17+ t . type ( res , 'object' ) ;
18+ t . type ( res . _meta , 'object' ) ;
19+ t . type ( res . _meta . sprites , 'object' ) ;
20+ t . type ( res . _meta . scripts , 'object' ) ;
21+ t . type ( res . _meta . variables , 'object' ) ;
22+ t . type ( res . _meta . lists , 'object' ) ;
23+ t . type ( res . _meta . comments , 'object' ) ;
24+ t . type ( res . _meta . sounds , 'object' ) ;
25+ t . type ( res . _meta . costumes , 'object' ) ;
26+ t . type ( res . _meta . blocks , 'object' ) ;
27+ t . type ( res . _meta . extensions , 'object' ) ;
28+
29+ t . equal ( res . _meta . sprites . count , 2 , 'expected number of sprites' ) ;
30+ t . equal ( res . _meta . scripts . count , 5 , 'expected number of scripts' ) ;
31+ t . equal ( res . _meta . variables . count , 2 , 'expected number of variables' ) ;
32+ t . equal ( res . _meta . lists . count , 2 , 'expected number of lists' ) ;
33+ t . equal ( res . _meta . comments . count , 1 , 'expected number of comments' ) ;
34+ t . equal ( res . _meta . sounds . count , 4 , 'expected number of sounds' ) ;
35+ t . equal ( res . _meta . costumes . count , 16 , 'expected number of costumes' ) ;
36+ t . equal ( res . _meta . blocks . count , 16 , 'expected number of blocks' ) ;
37+ t . equal ( res . _meta . blocks . unique , 11 , 'exepected number of blocks' ) ;
38+ t . equal ( res . _meta . extensions . count , 1 , 'expected number of extensions' ) ;
1939
2040 t . end ( ) ;
2141 } ) ;
0 commit comments