nodeunit
nodeunit copied to clipboard
Double hash stream read causes test to fail
When I run nodeunit on the following code:
var crypto = require('crypto');
exports.wtf = function(test) {
var hash1 = crypto.createHash('sha256');
var hash2 = crypto.createHash('sha256');
hash2.on('readable', function() {
hash2.read(4); // comment this line and test passes
test.done();
});
hash1.pipe(hash2);
hash1.end(new Buffer(1000));
};
it fails with the error "TypeError: Cannot read property'setup' of undefined". If I comment out the indicated line, the test passes.
This is with node v0.10.6 and nodeunit 0.8.0 on Windows 8.