caolan / caolan/nodeunit

Double hash stream read causes test to fail

Offen
#208 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
1.9k
Forks
359
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When I run nodeunit on the following code:

``` javascript
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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.