Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

unix ported to tap, TAP CONVERSION COMPLETE

  • Loading branch information...
commit 948e2f3cd0383c57ff7ab51d6e90fa9baba38d4a 1 parent 7e26937
@substack authored
Showing with 7 additions and 9 deletions.
  1. +7 −9 test/unix.js
View
16 test/unix.js
@@ -1,25 +1,23 @@
var dnode = require('../');
-var assert = require('assert');
+var test = require('tap').test;
-exports.unix = function () {
+test('unix', function (t) {
+ t.plan(1);
+
var sfile = '/tmp/unix_socket_' + Math.floor(
Math.random() * Math.pow(2, 32)
).toString(16);
- var to = setTimeout(function () {
- assert.fail('never connected');
- }, 5000);
-
var server = dnode({ f : function (cb) { cb(1337) } }).listen(sfile);
server.on('ready', function () {
dnode.connect(sfile, function (remote, conn) {
remote.f(function (x) {
- clearTimeout(to);
- assert.equal(x, 1337);
+ t.equal(x, 1337);
server.close();
conn.end();
+ t.end();
});
});
});
-};
+});
Please sign in to comment.
Something went wrong with that request. Please try again.