| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 91d5a4d commit 16926a8
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -229,10 +229,12 @@ for (let i = 0; i < chunks.length; i++) { | |||
| 229 | 229 | tw.end(common.mustCall()); | |
| 230 | 230 | } | |
| 231 | 231 | ||
| 232 | + const helloWorldBuffer = Buffer.from('hello world'); | ||
| 233 | + | ||
| 232 | 234 | { | |
| 233 | 235 | // Verify end() callback with chunk | |
| 234 | 236 | const tw = new TestWriter(); | |
| 235 | - tw.end(Buffer.from('hello world'), common.mustCall()); | ||
| 237 | + tw.end(helloWorldBuffer, common.mustCall()); | ||
| 236 | 238 | } | |
| 237 | 239 | ||
| 238 | 240 | { | |
@@ -244,15 +246,15 @@ for (let i = 0; i < chunks.length; i++) { | |||
| 244 | 246 | { | |
| 245 | 247 | // Verify end() callback after write() call | |
| 246 | 248 | const tw = new TestWriter(); | |
| 247 | - tw.write(Buffer.from('hello world')); | ||
| 249 | + tw.write(helloWorldBuffer); | ||
| 248 | 250 | tw.end(common.mustCall()); | |
| 249 | 251 | } | |
| 250 | 252 | ||
| 251 | 253 | { | |
| 252 | 254 | // Verify end() callback after write() callback | |
| 253 | 255 | const tw = new TestWriter(); | |
| 254 | 256 | let writeCalledback = false; | |
| 255 | - tw.write(Buffer.from('hello world'), function() { | ||
| 257 | + tw.write(helloWorldBuffer, function() { | ||
| 256 | 258 | writeCalledback = true; | |
| 257 | 259 | }); | |
| 258 | 260 | tw.end(common.mustCall(function() { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments