• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

node-nock / nock / 2061
93%

Build:
DEFAULT BRANCH: master
Ran 07 Jun 2018 03:31AM UTC
Jobs 1
Files 13
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2061

push

travis-ci

gr2m
fix: use `aborted` property on http request (#1134)

I had some difficulty with this code:

    httpRequest.on('timeout', function () {
      trackFailure('timeout')
      httpRequest.abort()
    })

    httpRequest.on('error', function (err) {
      // Count error if request wasn't aborted due to timeout
      if (!httpRequest.aborted) {
        trackFailure(err)
      }
      callback(err)
    }

When `nock` was not in use, `trackFailure()` would be called once on
timeout.  With `nock` enabled, `trackFailure()` would be called twice
because `httpRequest.aborted` would be undefined.

This change creates and uses the `aborted` property in the same
fashion as the system `http` module.

739 of 876 branches covered (84.36%)

1396 of 1510 relevant lines covered (92.45%)

18951.66 hits per line

Jobs
ID Job ID Ran Files Coverage
7 2061.7 (coverage) 07 Jun 2018 03:31AM UTC 0
92.45
Travis Job 2061.7
Source Files on build 2061
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2061
  • aaa9a564 on github
  • Prev Build on master (#2058)
  • Next Build on master (#2063)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc