File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -150,15 +150,24 @@ describe("gulp-rename", function () {
150
150
helper ( srcPattern , obj , expectedPath , done ) ;
151
151
} ) ;
152
152
153
- it ( "can return a whole new object " , function ( done ) {
153
+ it ( "ignores the return value " , function ( done ) {
154
154
var obj = function ( /*path*/ ) {
155
155
return {
156
156
dirname : "elsewhere" ,
157
157
basename : "aloha" ,
158
158
extname : ".md"
159
159
} ;
160
160
} ;
161
- var expectedPath = "test/elsewhere/aloha.md" ;
161
+ var expectedPath = "test/fixtures/hello.txt" ;
162
+ helper ( srcPattern , obj , expectedPath , done ) ;
163
+ } ) ;
164
+
165
+ it ( "receives object with extname even if a different value is returned" , function ( done ) {
166
+ var obj = function ( path ) {
167
+ path . extname . should . equal ( ".txt" ) ;
168
+ return path . extname = ".md" ;
169
+ } ;
170
+ var expectedPath = "test/fixtures/hello.md" ;
162
171
helper ( srcPattern , obj , expectedPath , done ) ;
163
172
} ) ;
164
173
} ) ;
You can’t perform that action at this time.
0 commit comments