@@ -220,13 +220,12 @@ describe('gulp-google-closure-compiler', function() {
220220 compilation_level : 'SIMPLE' ,
221221 warning_level : 'VERBOSE'
222222 } )
223+ . src ( )
223224 . pipe ( assert . length ( 1 ) )
224225 . pipe ( assert . first ( function ( f ) {
225- f . contents . toString ( ) . should . eql ( 'function log(a){console.log(a)}log("one.js");log("two.js");\n' ) ;
226+ f . contents . toString ( ) . should . eql ( fixturesCompiled ) ;
226227 } ) )
227228 . pipe ( assert . end ( done ) ) ;
228-
229- stream . end ( ) ;
230229 } ) ;
231230
232231 it ( 'should include js options before gulp.src files' , function ( done ) {
@@ -255,46 +254,38 @@ describe('gulp-google-closure-compiler', function() {
255254 '--compilation_level=SIMPLE' ,
256255 '--warning_level=VERBOSE'
257256 ] )
257+ . src ( )
258258 . pipe ( assert . length ( 1 ) )
259259 . pipe ( assert . first ( function ( f ) {
260260 f . contents . toString ( ) . should . eql ( fixturesCompiled ) ;
261261 } ) )
262262 . pipe ( assert . end ( done ) ) ;
263-
264- stream . end ( ) ;
265263 } ) ;
266264
267- it ( 'should compile gulp.src files when stream input is required' , function ( done ) {
268- this . timeout ( 30000 ) ;
269- this . slow ( 10000 ) ;
270-
271- var streamRequiredCompiler = compilerPackage . gulp ( {
272- requireStreamInput : true
273- } ) ;
274-
275- gulp . src ( __dirname + '/fixtures/**.js' )
276- . pipe ( streamRequiredCompiler ( {
265+ it ( 'should generate no output without gulp.src files' , function ( done ) {
266+ gulp . src ( [ ] )
267+ . pipe ( closureCompiler ( {
277268 compilation_level : 'SIMPLE' ,
278269 warning_level : 'VERBOSE'
279270 } ) )
280- . pipe ( assert . length ( 1 ) )
281- . pipe ( assert . first ( function ( f ) {
282- f . contents . toString ( ) . should . eql ( fixturesCompiled ) ;
283- } ) )
271+ . pipe ( assert . length ( 0 ) )
284272 . pipe ( assert . end ( done ) ) ;
285273 } ) ;
286274
287- it ( 'should generate no output without gulp.src files when stream input is required' , function ( done ) {
288- var streamRequiredCompiler = compilerPackage . gulp ( {
289- requireStreamInput : true
290- } ) ;
275+ it ( 'should compile without gulp.src files when .src() is called' , function ( done ) {
276+ this . timeout ( 30000 ) ;
277+ this . slow ( 10000 ) ;
291278
292- gulp . src ( [ ] )
293- . pipe ( streamRequiredCompiler ( {
279+ closureCompiler ( {
294280 compilation_level : 'SIMPLE' ,
295- warning_level : 'VERBOSE'
281+ warning_level : 'VERBOSE' ,
282+ js : __dirname + '/fixtures/**.js'
283+ } )
284+ . src ( )
285+ . pipe ( assert . length ( 1 ) )
286+ . pipe ( assert . first ( function ( f ) {
287+ f . contents . toString ( ) . should . eql ( fixturesCompiled ) ;
296288 } ) )
297- . pipe ( assert . length ( 0 ) )
298289 . pipe ( assert . end ( done ) ) ;
299290 } ) ;
300291
0 commit comments