Permalink
Browse files

Add vows test to verify that file information is passed to transform …

…functions properly.
  • Loading branch information...
1 parent d227a8b commit a84ab85ae0e27e67f383e789d237d319e0be5c64 @justindujardin justindujardin committed Feb 9, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/ncp-test.js
View
12 test/ncp-test.js
@@ -70,5 +70,17 @@ vows.describe('ncp').addBatch({
}
}
}
+}).addBatch({
+ 'When copying files using transform': {
+ 'it should pass file descriptors along to transform functions': function() {
+ ncp(src, out, {
+ transform: function(read,write,file) {
+ assert.notEqual(file.name, undefined);
+ assert.strictEqual(typeof file.mode,'number');
+ read.pipe(write);
+ }
+ }, function(){});
+ }
+ }
}).export(module);

0 comments on commit a84ab85

Please sign in to comment.