File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines 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 ( ) {
You can’t perform that action at this time.
0 commit comments