Projekt

Obecné

Profil

Stáhnout (293 Bajtů) Statistiky
| Větev: | Revize:
1 3a515b92 cagy
var assert = require('assert');
2
3
function expectData(stream, expected, callback) {
4
  var actual = '';
5
6
  stream.on('data', function(chunk) {
7
    actual += chunk;
8
  });
9
  stream.on('end', function() {
10
    assert.equal(actual, expected);
11
    callback();
12
  });
13
}
14
exports.expectData = expectData;