libp2p / js-libp2p-kad-dht

JavaScript implementation of the DHT for libp2p
https://libp2p.io
Other
141 stars 60 forks source link

Tests hang on node v11 #52

Open jhiesey opened 5 years ago

jhiesey commented 5 years ago

I recently updated to node v11.1.0, and the tests that previously worked fine hang. The TypeError isn't new; haven't investigated it.

➜  js-libp2p-kad-dht git:(master) npm test

> libp2p-kad-dht@0.10.6 test /Users/jhiesey/Work/PL/js-libp2p-kad-dht
> aegir test -t node

TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type object
    at Module.require (internal/modules/cjs/loader.js:637:11)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.exports.getUserConfig (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/aegir/src/utils.js:82:12)
    at userConfig (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/aegir/src/config/user.js:69:24)
    at Object.run (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/aegir/src/test/index.js:35:49)
    at Object.handler (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/aegir/cmds/test.js:74:17)
    at Object.runCommand (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/yargs/yargs.js:1013:30)
    at Object.get [as argv] (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/yargs/yargs.js:957:21)
    at Object.<anonymous> (/Users/jhiesey/Work/PL/js-libp2p-kad-dht/node_modules/aegir/cli.js:35:3)
Test Node.js
Warning: Could not find any test files matching pattern: test/node.js

  KadDHT
    ✓ create
    ✓ should be able to start and stop
    ✓ should be able to start with random-walk disabled
    ✓ put - get (219ms)
    ✓ put - get with update (191ms)
[no more output]
jhiesey commented 5 years ago

For now I'm going to stick with node v10.13.0 which works.