@@ -23,8 +23,12 @@ writer1._write = common.mustCall(function(chunk, encoding, cb) { |
23 | 23 | }, 1); |
24 | 24 |
|
25 | 25 | writer1.once('chunk-received', function() { |
26 | | - assert.strictEqual(reader._readableState.awaitDrain, 0, |
27 | | - 'initial value is not 0'); |
| 26 | + assert.strictEqual( |
| 27 | + reader._readableState.awaitDrain, |
| 28 | + 0, |
| 29 | + 'awaitDrain initial value should be 0, actual is ' + |
| 30 | + reader._readableState.awaitDrain |
| 31 | + ); |
28 | 32 | setImmediate(function() { |
29 | 33 | // This one should *not* get through to writer1 because writer2 is not |
30 | 34 | // "done" processing. |
@@ -35,8 +39,10 @@ writer1.once('chunk-received', function() { |
35 | 39 | // A "slow" consumer: |
36 | 40 | writer2._write = common.mustCall(function(chunk, encoding, cb) { |
37 | 41 | assert.strictEqual( |
38 | | - reader._readableState.awaitDrain, 1, |
39 | | - 'awaitDrain isn\'t 1 after first push' |
| 42 | + reader._readableState.awaitDrain, |
| 43 | + 1, |
| 44 | + 'awaitDrain should be 1 after first push, actual is ' + |
| 45 | + reader._readableState.awaitDrain |
40 | 46 | ); |
41 | 47 | // Not calling cb here to "simulate" slow stream. |
42 | 48 | // This should be called exactly once, since the first .write() call |
@@ -45,8 +51,10 @@ writer2._write = common.mustCall(function(chunk, encoding, cb) { |
45 | 51 |
|
46 | 52 | writer3._write = common.mustCall(function(chunk, encoding, cb) { |
47 | 53 | assert.strictEqual( |
48 | | - reader._readableState.awaitDrain, 2, |
49 | | - 'awaitDrain isn\'t 2 after second push' |
| 54 | + reader._readableState.awaitDrain, |
| 55 | + 2, |
| 56 | + 'awaitDrain should be 2 after second push, actual is ' + |
| 57 | + reader._readableState.awaitDrain |
50 | 58 | ); |
51 | 59 | // Not calling cb here to "simulate" slow stream. |
52 | 60 | // This should be called exactly once, since the first .write() call |
|