test: Buffer() is deprecated due to security and usability issues. so use the Buffer.alloc() instead (#1321)
This commit is contained in:
parent
130e363856
commit
04e07fdc62
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ describe('res.writable', () => {
|
|||
describe('when continuous requests in one persistent connection', () => {
|
||||
function requestTwice(server, done){
|
||||
const port = server.address().port;
|
||||
const buf = new Buffer('GET / HTTP/1.1\r\nHost: localhost:' + port + '\r\nConnection: keep-alive\r\n\r\n');
|
||||
const buf = Buffer.from('GET / HTTP/1.1\r\nHost: localhost:' + port + '\r\nConnection: keep-alive\r\n\r\n');
|
||||
const client = net.connect(port);
|
||||
const datas = [];
|
||||
client
|
||||
|
|
Loading…
Reference in a new issue