diff --git a/README.md b/README.md index 9efb1dc..96e7c66 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ -# node-libp2p-tcp -Node.js implementation of the TCP module that libp2p uses, which implements the abstract-connection interface +node-libp2p-tcp +=============== + +[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) [[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) ![Build Status](https://travis-ci.org/diasdavid/node-libp2p-tcp.svg?style=flat-square)](https://travis-ci.org/diasdavid/node-libp2p-tcp) ![](https://img.shields.io/badge/coverage-%3F-yellow.svg?style=flat-square) [![Dependency Status](https://david-dm.org/diasdavid/node-libp2p-tcp.svg?style=flat-square)](https://david-dm.org/diasdavid/node-libp2p-tcp) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard) + +> Node.js implementation of the TCP module that libp2p uses, which implements the [abstract-connection]() interface for dial/listen. + +note: libp2p-tcp in Node.js is a very thin shim that adds the support to dial to a `multiaddr`. This small shim will enable libp2p to use other different transports. diff --git a/package.json b/package.json index 2309e6b..2e438f4 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,9 @@ "description": "Node.js implementation of the TCP module that libp2p uses, which implements the abstract-connection interface", "main": "src/index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "node tests/test-ac.js" }, - "pre-commit": [ - ], + "pre-commit": [], "repository": { "type": "git", "url": "https://github.com/diasdavid/node-libp2p-tcp.git" @@ -22,8 +21,12 @@ }, "homepage": "https://github.com/diasdavid/node-libp2p-tcp", "devDependencies": { + "abstract-connection": "^0.1.0", "pre-commit": "^1.1.1", "standard": "^5.2.2", "tape": "^4.2.0" + }, + "dependencies": { + "multiaddr": "^1.0.0" } } diff --git a/tests/test-ac.js b/tests/test-ac.js index e69de29..5a012aa 100644 --- a/tests/test-ac.js +++ b/tests/test-ac.js @@ -0,0 +1,14 @@ +var tape = require('tape') +var tests = require('abstract-connection/tests') +var conn = require('../src') + +var common = { + setup: function (t, cb) { + cb(null, conn) + }, + teardown: function (t, cb) { + cb() + } +} + +tests(tape, common)