11'use strict' ;
22
3- var diffMatchers = require ( 'jasmine-diff-matchers' ) ;
3+ var diffMatchers = require ( 'jasmine-diff-matchers' ) ,
4+ fs = require ( 'fs' ) ,
5+ path = require ( 'path' ) ;
46
57var helper = require ( './../../helpers/angularity-test' ) ,
68 matchers = require ( './../../helpers/jasmine-matchers' ) ;
@@ -10,11 +12,25 @@ var BUILD_FOLDER = 'app-build';
1012function expectations ( testCase ) {
1113 var workingBuildFile = helper . getConcatenation ( testCase . cwd , BUILD_FOLDER ) ;
1214 var sourceBuildFile = helper . getConcatenation ( testCase . sourceDir , testCase . subdir , BUILD_FOLDER ) ;
15+
16+ // general
1317 expect ( testCase . stdout ) . toBeTask ( 'css' ) ;
18+
19+ // build output
1420 expect ( testCase . cwd ) . toHaveExpectedCssExcept ( ) ;
1521 expect ( workingBuildFile ( 'index.css' ) ) . diffFilePatch ( sourceBuildFile ( 'index.css' ) ) ;
16- // expect(workingBuildFile('index.css.map')).diffFilePatch(sourceBuildFile('index.css.map'));
17- // TODO @bholloway solve repeatability of .map files
22+ // expect(workingBuildFile('index.css.map')).diffFilePatch(sourceBuildFile('index.css.map'));
23+ // TODO @bholloway solve repeatability of .map files
24+
25+ // css assets
26+ var assetDir = path . join . apply ( path , sourceBuildFile ( 'index.css.assets' ) ) ;
27+ if ( fs . existsSync ( assetDir ) ) {
28+ fs . readdirSync ( assetDir )
29+ . forEach ( function eachAsset ( relative ) {
30+ console . log ( relative ) ;
31+ expect ( workingBuildFile ( relative ) ) . diffFilePatch ( sourceBuildFile ( relative ) ) ;
32+ } ) ;
33+ }
1834}
1935
2036function customMatchers ( ) {
0 commit comments