| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 271c89e commit 172652b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,11 +30,13 @@ readable.once('pause', common.mustCall(() => { | |||
| 30 | 30 | assert.strictEqual( | |
| 31 | 31 | readable._readableState.awaitDrain, | |
| 32 | 32 | 1, | |
| 33 | - 'awaitDrain doesn\'t increase' | ||
| 33 | + 'Expected awaitDrain to equal 1 but instead got ' + | ||
| 34 | + `${readable._readableState.awaitDrain}` | ||
| 34 | 35 | ); | |
| 35 | 36 | // First pause, resume manually. The next write() to writable will still | |
| 36 | 37 | // return false, because chunks are still being buffered, so it will increase | |
| 37 | 38 | // the awaitDrain counter again. | |
| 39 | + | ||
| 38 | 40 | process.nextTick(common.mustCall(() => { | |
| 39 | 41 | readable.resume(); | |
| 40 | 42 | })); | |
@@ -43,7 +45,8 @@ readable.once('pause', common.mustCall(() => { | |||
| 43 | 45 | assert.strictEqual( | |
| 44 | 46 | readable._readableState.awaitDrain, | |
| 45 | 47 | 1, | |
| 46 | - '.resume() does not reset counter' | ||
| 48 | + '.resume() should not reset the counter but instead got ' + | ||
| 49 | + `${readable._readableState.awaitDrain}` | ||
| 47 | 50 | ); | |
| 48 | 51 | // Second pause, handle all chunks from now on. Once all callbacks that | |
| 49 | 52 | // are currently queued up are handled, the awaitDrain drain counter should | |
@@ -64,7 +67,8 @@ writable.on('finish', common.mustCall(() => { | |||
| 64 | 67 | assert.strictEqual( | |
| 65 | 68 | readable._readableState.awaitDrain, | |
| 66 | 69 | 0, | |
| 67 | - 'awaitDrain not 0 after all chunks are written' | ||
| 70 | + 'awaitDrain should equal 0 after all chunks are written but instead got' + | ||
| 71 | + `${readable._readableState.awaitDrain}` | ||
| 68 | 72 | ); | |
| 69 | 73 | // Everything okay, all chunks were written. | |
| 70 | 74 | })); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments