mirror of https://github.com/nodejs/node.git
test: fix up indentation, replace tabs with spaces
parent
b3b8e74dbf
commit
8a65df9baa
|
@ -123,7 +123,7 @@ function error_test() {
|
||||||
{ client: client_unix, send: '.1234',
|
{ client: client_unix, send: '.1234',
|
||||||
expect: '0.1234' },
|
expect: '0.1234' },
|
||||||
// Floating point expressions are not interpreted as REPL commands
|
// Floating point expressions are not interpreted as REPL commands
|
||||||
{ client: client_unix, send: '.1+.1',
|
{ client: client_unix, send: '.1+.1',
|
||||||
expect: '0.2' },
|
expect: '0.2' },
|
||||||
// Can parse valid JSON
|
// Can parse valid JSON
|
||||||
{ client: client_unix, send: 'JSON.parse(\'{"valid": "json"}\');',
|
{ client: client_unix, send: 'JSON.parse(\'{"valid": "json"}\');',
|
||||||
|
|
|
@ -42,20 +42,20 @@ var server = tls.createServer(options, function(c) {
|
||||||
|
|
||||||
var once = false;
|
var once = false;
|
||||||
|
|
||||||
var writeAgain = setTimeout(function() {
|
var writeAgain = setTimeout(function() {
|
||||||
client.write(bonkers);
|
client.write(bonkers);
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('error', function(err) {
|
client.on('error', function(err) {
|
||||||
if (!once) {
|
if (!once) {
|
||||||
clearTimeout(writeAgain);
|
clearTimeout(writeAgain);
|
||||||
once = true;
|
once = true;
|
||||||
client.destroy();
|
client.destroy();
|
||||||
server.close();
|
server.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('close', function (hadError) {
|
client.on('close', function (hadError) {
|
||||||
assert.strictEqual(hadError, true, 'Client never errored');
|
assert.strictEqual(hadError, true, 'Client never errored');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue