Browse Source

Fix test-net-stream.js

I broke this in 09ee293.
v0.7.4-release
Felix Geisendörfer 14 years ago
parent
commit
1b3ebc32d7
  1. 8
      test/simple/test-net-stream.js

8
test/simple/test-net-stream.js

@ -22,14 +22,16 @@
var common = require('../common'); var common = require('../common');
var assert = require('assert'); var assert = require('assert');
var Stream = require('net').Stream; var net = require('net');
var s = new Stream(); var s = new net.Stream();
// test that destroy called on a stream with a server only ever decrements the // test that destroy called on a stream with a server only ever decrements the
// server connection count once // server connection count once
s.server = { connections: 10 } s.server = new net.Server();
s.server.connections = 10;
assert.equal(10, s.server.connections); assert.equal(10, s.server.connections);
s.destroy() s.destroy()
assert.equal(9, s.server.connections); assert.equal(9, s.server.connections);

Loading…
Cancel
Save