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

pretenderjs / pretender / 465
64%
master: 64%

Build:
Build:
LAST BUILD BRANCH: v3.4.1
DEFAULT BRANCH: master
Ran 27 Feb 2020 10:09PM UTC
Jobs 1
Files 1
Run time 2s
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
465

Pull #295

travis-ci

web-flow
Vendor whatwg-fetch

Pretender uses the `whatwg-fetch` package in order to intercept `fetch` calls. However, Pretender relies implicitly on `whatwg-fetch` internals to get the `fetch` intercepting behavior working correctly.

This starting causing some problems in some systems where the `whatwg-fetch` package was swapped or removed altogether, since the package is indeed a polyfill and the system determined the behavior was present and thus the polyfill wasn't needed. However, because Pretender actually relied not only on the polyfill behavior but also internal implementation details, Pretender would break in these systems.

More details: The `fetch` implementation that `whatwg-fetch` provides actually delegates to `window.XMLHTTPRequest` under the hood. Since Pretender _also_ monkey patches `window.XMLHTTPRequest`, it is able to intercept `fetch` calls equally as well. But it's only due to those internals – due to the fact that the `whatwg-fetch` polyfill happens to use XMLHTTPRequest under the hood. This is not part of `whatwg-fetch`'s public API, even though it is unlikely the change.

Since Pretender has been relying on observable but undocumented behavior of `whatwg-fetch`, this commit vendors the package, ensuring that `whatwg-fetch` can no longer be treated as an external dependency and hoisted or replaced.
Pull Request #295: Vendor whatwg-fetch

270 of 513 branches covered (52.63%)

452 of 708 relevant lines covered (63.84%)

97.12 hits per line

Jobs
ID Job ID Ran Files Coverage
1 465.1 27 Feb 2020 10:09PM UTC 0
63.84
Travis Job 465.1
Source Files on build 465
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #465
  • Pull Request #295
  • PR Base - master (#463)
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