Browse Source

test: TTY only has writeBuffer(), not write()

This test is only passing because it's skipped normally.
v0.9.4-release
isaacs 12 years ago
parent
commit
4de274cbee
  1. 8
      test/simple/test-tty-wrap.js

8
test/simple/test-tty-wrap.js

@ -33,20 +33,16 @@ if (isTTY(1) == false) {
var handle = new TTY(1); var handle = new TTY(1);
var callbacks = 0; var callbacks = 0;
var req1 = handle.write(Buffer('hello world\n')); var req1 = handle.writeBuffer(Buffer('hello world\n'));
req1.oncomplete = function() { req1.oncomplete = function() {
callbacks++; callbacks++;
}; };
var req2 = handle.write(Buffer('hello world\n')); var req2 = handle.writeBuffer(Buffer('hello world\n'));
req2.oncomplete = function() { req2.oncomplete = function() {
callbacks++; callbacks++;
}; };
handle.close();
process.on('exit', function() { process.on('exit', function() {
assert.equal(2, callbacks); assert.equal(2, callbacks);
}); });

Loading…
Cancel
Save