FLYBYME/node-transmission

Tests don't pass

robgmills opened this issue · 2 comments

Thanks for a helpful node package! It's been really easy to get up-and-running so far. The main RPC methods work great and I've been able to write my own app that supports adding, pausing, restarting, and deleting (with or without data) torrents.

I'd like to make some contributions to support other methods available on the transmission rpc specification. But I don't want to introduce any regressions.

Forgive me if this is naive as I'm still a little "new" to node. But immediately after checking out the master branch, I was unable to run the tests. Please advise if I'm just doing this incorrectly and need to shut up.

Steps to Reproduce

Clone repository

❯ git clone git@github.com:FLYBYME/node-transmission.git
Cloning into 'node-transmission'...
remote: Counting objects: 451, done.
remote: Total 451 (delta 0), reused 0 (delta 0), pack-reused 451
Receiving objects: 100% (451/451), 93.74 KiB | 0 bytes/s, done.
Resolving deltas: 100% (186/186), done.

Install dependencies via npm

❯ npm install
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global jshint@2.9.4 should be installed with -g
transmission@0.4.8 /home/robgmills/code/node-transmission
├─┬ async@2.1.4  invalid
│ └── lodash@4.17.4
├─┬ chai@1.10.0
│ ├── assertion-error@1.0.0
│ └─┬ deep-eql@0.1.3
│   └── type-detect@0.1.1
├── dotenv@0.4.0
├─┬ mocha@2.5.3
│ ├── commander@2.3.0
│ ├─┬ debug@2.2.0
│ │ └── ms@0.7.1
│ ├── diff@1.4.0
│ ├── escape-string-regexp@1.0.2
│ ├─┬ glob@3.2.11
│ │ ├── inherits@2.0.3
│ │ └─┬ minimatch@0.3.0
│ │   ├── lru-cache@2.7.3
│ │   └── sigmund@1.0.1
│ ├── growl@1.9.2
│ ├─┬ jade@0.26.3
│ │ ├── commander@0.6.1
│ │ └── mkdirp@0.3.0
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ ├── supports-color@1.2.0
│ └── to-iso-string@0.0.2
├─┬ mocha-jshint@0.0.9
│ └─┬ jshint@2.9.4
│   ├─┬ cli@1.0.1
│   │ └─┬ glob@7.1.1
│   │   ├── fs.realpath@1.0.0
│   │   ├─┬ inflight@1.0.6
│   │   │ └── wrappy@1.0.2
│   │   ├── minimatch@3.0.3
│   │   ├── once@1.4.0
│   │   └── path-is-absolute@1.0.1
│   ├─┬ console-browserify@1.1.0
│   │ └── date-now@0.1.4
│   ├── exit@0.1.2
│   ├─┬ htmlparser2@3.8.3
│   │ ├── domelementtype@1.3.0
│   │ ├── domhandler@2.3.0
│   │ ├─┬ domutils@1.5.1
│   │ │ └─┬ dom-serializer@0.1.0
│   │ │   ├── domelementtype@1.1.3
│   │ │   └── entities@1.1.1
│   │ ├── entities@1.0.0
│   │ └─┬ readable-stream@1.1.14
│   │   ├── core-util-is@1.0.2
│   │   ├── isarray@0.0.1
│   │   └── string_decoder@0.10.31
│   ├── lodash@3.7.0
│   ├─┬ minimatch@3.0.3
│   │ └─┬ brace-expansion@1.1.6
│   │   ├── balanced-match@0.4.2
│   │   └── concat-map@0.0.1
│   ├── shelljs@0.3.0
│   └── strip-json-comments@1.0.4
├── progress@1.1.8
└── yargs@1.3.3

npm WARN transmission@0.4.8 No license field.

Run the tests

❯ npm test

> transmission@0.4.8 test /home/robgmills/code/node-transmission
> mocha --ui bdd --reporter spec --colors --slow 10000



  jshint
    1) should pass for working directory

  transmission
    2) "before all" hook


  0 passing (258ms)
  2 failing

  1) jshint should pass for working directory:
     jshint errors
  Missing semicolon. (W033)
   at (example.js:67:32)
  Expected '===' and instead saw '=='. (W116)
   at (lib/transmission.js:19:30)
  'a' is defined but never used. (W098)
   at (lib/transmission.js:190:27)
  Missing semicolon. (W033)
   at (lib/transmission.js:200:79)
  Missing semicolon. (W033)
   at (lib/transmission.js:213:33)

  2) transmission "before all" hook:
     Error: connect ECONNREFUSED 127.0.0.1:9091
      at Object.exports._errnoException (util.js:1022:11)
      at exports._exceptionWithHostPort (util.js:1045:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)



npm ERR! Test failed.  See above for more details.

Look like its failing to connect to the transmission daemon. Is the daemon running on localhost port 9091?

Yeah, so I'm just a dumbass. My bad. Thanks.