mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-23 00:45:16 +00:00
15 lines
293 B
JavaScript
15 lines
293 B
JavaScript
|
var assert = require('assert');
|
||
|
|
||
|
function expectData(stream, expected, callback) {
|
||
|
var actual = '';
|
||
|
|
||
|
stream.on('data', function(chunk) {
|
||
|
actual += chunk;
|
||
|
});
|
||
|
stream.on('end', function() {
|
||
|
assert.equal(actual, expected);
|
||
|
callback();
|
||
|
});
|
||
|
}
|
||
|
exports.expectData = expectData;
|