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

pretenderjs / pretender
64%
master: 64%

Build:
Build:
LAST BUILD BRANCH: v3.4.1
DEFAULT BRANCH: master
Repo Added 06 Aug 2015 08:35PM UTC
Files 1
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

LAST BUILD ON BRANCH vendor-whatwg-fetch
branch: vendor-whatwg-fetch
CHANGE BRANCH
x
Reset
  • vendor-whatwg-fetch
  • 0.10.0
  • 0.10.1
  • 0.11.0
  • 0.12.0
  • 0.13.0
  • 1.0.0
  • 1.1.0
  • 1.2.0
  • 1.3.0
  • 1.4.0
  • 1.4.1
  • bump-deps
  • bump-qunit
  • clocks
  • code-of-conduct
  • dependabot/npm_and_yarn/acorn-6.4.1
  • dependabot/npm_and_yarn/bower-1.8.8
  • dependabot/npm_and_yarn/eslint-utils-1.4.2
  • dependabot/npm_and_yarn/handlebars-4.1.2
  • dependabot/npm_and_yarn/mixin-deep-1.3.2
  • fix-162
  • fix-193
  • fix-197
  • fix-travis
  • importable-in-node
  • json-helper
  • leak
  • master
  • move-comment
  • release
  • release-2
  • release-one-dot-four-dot-one
  • release-one-four-oh
  • remove-node-oh-dot-twelve
  • response
  • return-handler-from-verbify-methods
  • use-nested-qunit-style
  • v0.10.0
  • v1.4.2
  • v1.5.0
  • v1.5.1
  • v1.6.0
  • v1.6.1
  • v2.0.0
  • v2.1.0
  • v2.1.1
  • v2.1.2
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.1.0
  • v3.2.0
  • v3.3.0
  • v3.3.1
  • v3.4.0
  • v3.4.1
  • warn-not-raise-on-double-start
  • warn-on-second-pretender

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

Relevant lines Covered
Build:
Build:
708 RELEVANT LINES 452 COVERED LINES
97.12 HITS PER LINE
Source Files on vendor-whatwg-fetch
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
465 vendor-whatwg-fetch 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... Pull #295 27 Feb 2020 10:09PM UTC web-flow travis-ci pending completion  
464 vendor-whatwg-fetch 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... push 27 Feb 2020 10:09PM UTC samselikoff travis-ci pending completion  
See All Builds (224)
  • Repo on GitHub
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

© 2025 Coveralls, Inc