You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
293 B

4 years ago
  1. var assert = require('assert');
  2. function expectData(stream, expected, callback) {
  3. var actual = '';
  4. stream.on('data', function(chunk) {
  5. actual += chunk;
  6. });
  7. stream.on('end', function() {
  8. assert.equal(actual, expected);
  9. callback();
  10. });
  11. }
  12. exports.expectData = expectData;