@@ -93,6 +93,20 @@ describe('nodemon exec', function () {
9393 assert ( options . ext . indexOf ( 'jade' ) !== - 1 , 'pipe separated string' ) ;
9494 } ) ;
9595
96+ it ( 'should support watching all extensions' , function ( ) {
97+ var options = exec ( { script : 'app.js' , ext : '' } ) ;
98+ assert . equal ( options . ext , '' , 'does not set default extensions when empty extension requested' ) ;
99+
100+ options = exec ( { script : 'app.js' , ext : '.' } ) ;
101+ assert . equal ( options . ext , '' , 'treats `.` as wildcard extension' ) ;
102+
103+ options = exec ( { script : 'app.js' , ext : '*' } ) ;
104+ assert . equal ( options . ext , '' , 'treats `*` as wildcard extension' ) ;
105+
106+ options = exec ( { script : 'app.coffee' , exec : 'coffee' , ext : '' } ) ;
107+ assert . equal ( options . ext , '' , 'does not set default extensions when empty extension requested' ) ;
108+ } ) ;
109+
96110 it ( 'should replace {{filename}}' , function ( ) {
97111 var options = exec ( { script : 'app.js' , exec : 'node {{filename}}.tmp --somethingElse' } ) ;
98112
@@ -182,6 +196,10 @@ describe('nodemon exec', function () {
182196 var options = exec ( { script : 'app' } ) ;
183197 var cmd = toCmd ( options ) ;
184198 assert ( cmd . string === 'node app.js' , cmd . string ) ;
199+
200+ options = exec ( { script : 'app' , ext : '' } ) ;
201+ cmd = toCmd ( options ) ;
202+ assert ( cmd . string === 'node app.js' , cmd . string ) ;
185203 } ) ;
186204
187205 it ( 'should expand based on custom extensions to hello.py' , function ( ) {
0 commit comments