diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js index 6db742e9561ca8..d0f02b114c1f97 100644 --- a/test/parallel/test-buffer-alloc.js +++ b/test/parallel/test-buffer-alloc.js @@ -309,12 +309,12 @@ assert.strictEqual('TWFu', (Buffer.from('Man')).toString('base64')); assert.strictEqual(quote, b.toString('ascii', 0, quote.length)); // check that the base64 decoder ignores whitespace - const expectedWhite = expected.slice(0, 60) + ' \n' + - expected.slice(60, 120) + ' \n' + - expected.slice(120, 180) + ' \n' + - expected.slice(180, 240) + ' \n' + - expected.slice(240, 300) + '\n' + - expected.slice(300, 360) + '\n'; + const expectedWhite = `${expected.slice(0, 60)} \n` + + `${expected.slice(60, 120)} \n` + + `${expected.slice(120, 180)} \n` + + `${expected.slice(180, 240)} \n` + + `${expected.slice(240, 300)}\n` + + `${expected.slice(300, 360)}\n`; b = Buffer.allocUnsafe(1024); bytesWritten = b.write(expectedWhite, 0, 'base64'); assert.strictEqual(quote.length, bytesWritten);