tomas / needle

Nimble, streamable HTTP client for Node.js. With proxy, iconv, cookie, deflate & multipart support.

Home Page:https://www.npmjs.com/package/needle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failing tests

erf opened this issue · comments

I ran npm test now after creating the keys as per README instructions, but 8 tests failed:

231 passing (13s)
  2 pending
  8 failing

  1) when posting a very long string
       shouldn't throw an EPIPE error out of nowhere:
     Uncaught Error: write EPIPE
      at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)

  2) with output option
       and a 200 response
         for an empty response
           closes the file descriptor:
     Error: ENOENT: no such file or directory, scandir '/proc/self/fd'
      at Object.readdirSync (node:fs:1380:3)
      at get_open_file_descriptors (test/output_spec.js:27:19)
      at Context.<anonymous> (test/output_spec.js:114:34)
      at processImmediate (node:internal/timers:464:21)

  3) with output option
       and a 200 response
         for a JSON response
           closes the file descriptor:
     Error: ENOENT: no such file or directory, scandir '/proc/self/fd'
      at Object.readdirSync (node:fs:1380:3)
      at get_open_file_descriptors (test/output_spec.js:27:19)
      at Context.<anonymous> (test/output_spec.js:171:32)
      at processImmediate (node:internal/timers:464:21)

  4) with output option
       and a 200 response
         for a binary file
           closes the file descriptor:
     Error: ENOENT: no such file or directory, scandir '/proc/self/fd'
      at Object.readdirSync (node:fs:1380:3)
      at get_open_file_descriptors (test/output_spec.js:27:19)
      at Context.<anonymous> (test/output_spec.js:241:34)
      at processImmediate (node:internal/timers:464:21)

  5) request stream length
       no stream_length set
         returns 400 if Transfer-Encoding is set to a blank string:

      Uncaught AssertionError: expected 200 to equal 400
      + expected - actual

      -200
      +400

      at Assertion.fail (node_modules/should/cjs/should.js:275:17)
      at Assertion.value (node_modules/should/cjs/should.js:356:19)
      at /Users/erlend/projects/needle/test/request_stream_spec.js:67:34
      at /Users/erlend/projects/needle/test/request_stream_spec.js:50:7
      at done (lib/needle.js:469:14)
      at PassThrough.<anonymous> (lib/needle.js:720:9)
      at PassThrough.emit (node:events:394:28)
      at endReadableNT (node:internal/streams/readable:1329:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)

  6) request stream length
       stream_length set to invalid value
         returns 400 if Transfer-Encoding is set to a blank string:

      Uncaught AssertionError: expected 200 to equal 400
      + expected - actual

      -200
      +400

      at Assertion.fail (node_modules/should/cjs/should.js:275:17)
      at Assertion.value (node_modules/should/cjs/should.js:356:19)
      at /Users/erlend/projects/needle/test/request_stream_spec.js:97:34
      at /Users/erlend/projects/needle/test/request_stream_spec.js:50:7
      at done (lib/needle.js:469:14)
      at PassThrough.<anonymous> (lib/needle.js:720:9)
      at PassThrough.emit (node:events:394:28)
      at endReadableNT (node:internal/streams/readable:1329:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)

  7) request stream length
       stream_length set to invalid value
         returns 400 if Transfer-Encoding is not set:

      Uncaught AssertionError: expected 200 to equal 400
      + expected - actual

      -200
      +400

      at Assertion.fail (node_modules/should/cjs/should.js:275:17)
      at Assertion.value (node_modules/should/cjs/should.js:356:19)
      at /Users/erlend/projects/needle/test/request_stream_spec.js:105:34
      at /Users/erlend/projects/needle/test/request_stream_spec.js:50:7
      at done (lib/needle.js:469:14)
      at PassThrough.<anonymous> (lib/needle.js:720:9)
      at PassThrough.emit (node:events:394:28)
      at endReadableNT (node:internal/streams/readable:1329:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)

  8) request stream length
       stream_length set to 0
         stream without path
           returns 400 if Transfer-Encoding is set to a blank string:

      Uncaught AssertionError: expected 200 to equal 400
      + expected - actual

      -200
      +400

      at Assertion.fail (node_modules/should/cjs/should.js:275:17)
      at Assertion.value (node_modules/should/cjs/should.js:356:19)
      at /Users/erlend/projects/needle/test/request_stream_spec.js:212:36
      at /Users/erlend/projects/needle/test/request_stream_spec.js:50:7
      at done (lib/needle.js:469:14)
      at PassThrough.<anonymous> (lib/needle.js:720:9)
      at PassThrough.emit (node:events:394:28)
      at endReadableNT (node:internal/streams/readable:1329:12)
      at processTicksAndRejections (node:internal/process/task_queues:83:21)