js-libp2p/test/node.js
Jacob Heun 5e1dbc21a2 refactor(async): add dialer and upgrader (#462)
* chore(deps): update connection and multistream

* feat: add basic dial support for addresses and peers

* test: automatically require all node test files

* fix: dont catch and log in the wrong place

* test: add direct spec test

fix: improve dial error consistency

* feat: add dial timeouts and concurrency

Queue timeouts will result in aborts of the dials

* chore: fix linting

* test: verify dialer defaults

* feat: add initial upgrader

* fix: add more test coverage and fix bugs

* feat: libp2p creates the upgrader

* feat: hook up handle to the upgrader

* feat: hook up the dialer to libp2p

test: add node dialer libp2p tests

* feat: add connection listeners to upgrader

* feat: emit connect and disconnect events

* chore: use libp2p-interfaces

* fix: address review feedback

* fix: correct import

* refactor: dedupe connection creation code
2020-01-24 14:40:40 +01:00

15 lines
385 B
JavaScript

'use strict'
const glob = require('glob')
const path = require('path')
// Automatically require test files so we don't have to worry about adding new ones
glob('test/**/*.node.js', function (err, testPaths) {
if (err) throw err
if (testPaths.length < 1) throw new Error('Could not find any node test files')
testPaths.forEach(file => {
require(path.resolve(file))
})
})