test: reduce string concatenations

Backport-PR-URL: https://github.com/nodejs/node/pull/13835
PR-URL: https://github.com/nodejs/node/pull/12735
Refs: https://github.com/nodejs/node/pull/12455
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
Vse Mozhet Byt authored and Myles Borins committed 2017-07-11 17:43:49 +01:00
1 parent c902265b90
commit 5b74e635e5
334 files changed
+957 -1026

No files matched your search

+3 -3
View File
@@ -13,8 +13,8 @@ const tls = require('tls');
const fs = require('fs');
const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/agent1-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/agent1-cert.pem')
key: fs.readFileSync(`${common.fixturesDir}/keys/agent1-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent1-cert.pem`)
};
// Force splitting incoming data
@@ -23,7 +23,7 @@ tls.SLAB_BUFFER_SIZE = 1;
const server = https.createServer(options);
server.on('upgrade', common.mustCall(function(req, socket, upgrade) {
socket.on('data', function(data) {
throw new Error('Unexpected data: ' + data);
throw new Error(`Unexpected data: ${data}`);
});
socket.end('HTTP/1.1 200 Ok\r\n\r\n');
}));