fixtures.js 293 B

1234567891011121314
  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;