mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Add test of ClientRequest#setNoDelay interface
Uses an invalid address as request address to avoid actual HTTP requests (since it is not necessary to make a real request to test this interface).
This commit is contained in:
@@ -95,3 +95,8 @@ var hmacResult: string = crypto.createHmac('md5', 'hello').update('world').diges
|
||||
// Make sure .listen() and .close() retuern a Server instance
|
||||
http.createServer().listen(0).close().address();
|
||||
net.createServer().listen(0).close().address();
|
||||
|
||||
var request = http.request('http://0.0.0.0');
|
||||
request.once('error', function () {});
|
||||
request.setNoDelay(true);
|
||||
request.abort();
|
||||
|
||||
Reference in New Issue
Block a user