Jest Fetch Mock is a utility designed for developers using the Jest testing framework who need to mock fetch requests in their tests. Versions 1.4.1 and 1.4.2, both authored by Jeff Lau, offer a straightforward way to simulate API calls without actually hitting external endpoints, ensuring isolated and predictable test environments. Both versions share core characteristics, including a dependency on isomorphic-fetch to provide fetch functionality across different JavaScript environments (browser and Node.js). The license remains MIT, showcasing a commitment to open-source principles.
The most notable difference between version 1.4.1, released on January 22, 2018, and version 1.4.2, released approximately a month later on February 21, 2018, lies in the dist section of the package metadata. While 1.4.1 only specifies the tarball location, 1.4.2 includes added details like fileCount (5) and unpackedSize (15272 bytes). While the specific changes are not detailed it is probably related to bug fixes or small enhacements to file structure. Generally, developers upgrading from 1.4.1 to 1.4.2 likely saw improvements or resolutions to minor issues, potentially contributing to a smoother testing experience. For new users, either version offers a simple and effective fetch mocking solution for Jest, enabling comprehensive and reliable testing of code that relies on API interactions.
All the vulnerabilities related to the version 1.4.2 of the package
node-fetch forwards secure headers to untrusted sites
node-fetch forwards secure headers such as authorization
, www-authenticate
, cookie
, & cookie2
when redirecting to a untrusted site.