Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
293 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | 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;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.