@@ -13,67 +13,67 @@ var fs = require('fs');
1313var path = require ( 'path' ) ;
1414
1515var getFile = function ( filePath ) {
16- var fullFilePath = './test/' + filePath ;
17- return new gutil . File ( {
18- path : fullFilePath ,
19- cwd : './test/' ,
20- base : path . dirname ( fullFilePath ) ,
21- contents : fs . readFileSync ( fullFilePath )
22- } ) ;
16+ var fullFilePath = './test/' + filePath ;
17+ return new gutil . File ( {
18+ path : fullFilePath ,
19+ cwd : './test/' ,
20+ base : path . dirname ( fullFilePath ) ,
21+ contents : fs . readFileSync ( fullFilePath )
22+ } ) ;
2323} ;
2424
2525describe ( 'gulp-bootlint' , function ( ) {
26- describe ( 'bootlintPlugin' , function ( ) {
27- it ( 'should pass file through' , function ( done ) {
28- var file = getFile ( 'fixtures/valid-bootstrap.html' ) ,
29- stream = bootlintPlugin ( ) ,
30- fileCount = 0 ;
26+ describe ( 'bootlintPlugin' , function ( ) {
27+ it ( 'should pass file through' , function ( done ) {
28+ var file = getFile ( 'fixtures/valid-bootstrap.html' ) ,
29+ stream = bootlintPlugin ( ) ,
30+ fileCount = 0 ;
3131
32- stream . on ( 'data' , function ( file ) {
33- should . exist ( file ) ;
34- should . exist ( file . path ) ;
35- should . exist ( file . relative ) ;
36- should . exist ( file . contents ) ;
37- should . exist ( file . bootlint ) ;
38- should . equal ( file . bootlint . success , true ) ;
39- file . path . should . equal ( './test/fixtures/valid-bootstrap.html' ) ;
40- file . relative . should . equal ( 'valid-bootstrap.html' ) ;
41- ++ fileCount ;
42- } ) ;
32+ stream . on ( 'data' , function ( file ) {
33+ should . exist ( file ) ;
34+ should . exist ( file . path ) ;
35+ should . exist ( file . relative ) ;
36+ should . exist ( file . contents ) ;
37+ should . exist ( file . bootlint ) ;
38+ should . equal ( file . bootlint . success , true ) ;
39+ file . path . should . equal ( './test/fixtures/valid-bootstrap.html' ) ;
40+ file . relative . should . equal ( 'valid-bootstrap.html' ) ;
41+ ++ fileCount ;
42+ } ) ;
4343
44- stream . once ( 'end' , function ( ) {
45- fileCount . should . equal ( 1 ) ;
46- done ( ) ;
47- } ) ;
44+ stream . once ( 'end' , function ( ) {
45+ fileCount . should . equal ( 1 ) ;
46+ done ( ) ;
47+ } ) ;
4848
49- stream . write ( file ) ;
50- stream . end ( ) ;
51- } ) ;
49+ stream . write ( file ) ;
50+ stream . end ( ) ;
51+ } ) ;
5252
53- it ( 'should send failure status' , function ( done ) {
54- var file = getFile ( 'fixtures/invalid-bootstrap.html' ) ,
55- stream = bootlintPlugin ( ) ,
56- fileCount = 0 ;
53+ it ( 'should send failure status' , function ( done ) {
54+ var file = getFile ( 'fixtures/invalid-bootstrap.html' ) ,
55+ stream = bootlintPlugin ( ) ,
56+ fileCount = 0 ;
5757
58- stream . on ( 'data' , function ( file ) {
59- ++ fileCount ;
60- should . exist ( file . bootlint ) ;
61- should . exist ( file . bootlint . success ) ;
62- file . bootlint . success . should . equal ( false ) ;
63- should . exist ( file . bootlint . issues ) ;
64- file . bootlint . issues . length . should . equal ( 1 ) ;
65- file . bootlint . issues [ 0 ] . id . should . equal ( 'W009' ) ;
66- } ) ;
67- stream . on ( 'error' , function ( err ) {
68- err . message . should . equal ( 'Lint errors found!' ) ;
69- } ) ;
70- stream . once ( 'end' , function ( ) {
71- fileCount . should . equal ( 1 ) ;
72- done ( ) ;
73- } ) ;
58+ stream . on ( 'data' , function ( file ) {
59+ ++ fileCount ;
60+ should . exist ( file . bootlint ) ;
61+ should . exist ( file . bootlint . success ) ;
62+ file . bootlint . success . should . equal ( false ) ;
63+ should . exist ( file . bootlint . issues ) ;
64+ file . bootlint . issues . length . should . equal ( 1 ) ;
65+ file . bootlint . issues [ 0 ] . id . should . equal ( 'W009' ) ;
66+ } ) ;
67+ stream . on ( 'error' , function ( err ) {
68+ err . message . should . equal ( 'Lint errors found!' ) ;
69+ } ) ;
70+ stream . once ( 'end' , function ( ) {
71+ fileCount . should . equal ( 1 ) ;
72+ done ( ) ;
73+ } ) ;
7474
75- stream . write ( file ) ;
76- stream . end ( ) ;
75+ stream . write ( file ) ;
76+ stream . end ( ) ;
77+ } ) ;
7778 } ) ;
78- } )
7979} ) ;
0 commit comments