Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…functions properly.
  • Loading branch information...
commit a84ab85ae0e27e67f383e789d237d319e0be5c64 1 parent d227a8b
@justindujardin justindujardin authored
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);
Please sign in to comment.
Something went wrong with that request. Please try again.