Giter VIP home page Giter VIP logo

Comments (7)

scottschafer avatar scottschafer commented on July 26, 2024 1

Thanks, we're actively looking into this now.

from cypressautomocker.

scottschafer avatar scottschafer commented on July 26, 2024 1

I just pushed a fix. Please give this a try and let me know if this fixes your issue. Thanks!

from cypressautomocker.

scottschafer avatar scottschafer commented on July 26, 2024

Hi @janhoogeveen - I'm happy to take a look. Can you upload a simple application that demonstrates the issue?

from cypressautomocker.

janhoogeveen avatar janhoogeveen commented on July 26, 2024

Certainly! Thanks for the offer.
I'll have to find some time in my schedule to get around to actually doing it, but I'll make it easy for you to look into this.

from cypressautomocker.

janhoogeveen avatar janhoogeveen commented on July 26, 2024

Hey Scott,

The easiest way to demo this problem is cloning your example repository and make the changes there. I've done that for you in a fork of your project.

https://github.com/janhoogeveen/cypressautomocker

Steps to reproduce this behavior:

  1. Use Fetch somewhere in your API
  2. Install whatwg-fetch polyfill (this is included by default in create-react-app)
  3. In cypress/support/commands.js file, remove Fetch from the global window (

Removing fetch in step 3 makes sure the Fetch polyfill is active. This polyfill uses XHR to mimick Fetch functionality and should for the most part behave similarly to jQuery's $.ajax() call.

There's caveats listed in the polyfills repo in how they differ from jQuery's implementation, but I'm not sure if that's related: https://github.com/github/fetch#caveats

from cypressautomocker.

janhoogeveen avatar janhoogeveen commented on July 26, 2024

Will let you know asap, thanks!

from cypressautomocker.

janhoogeveen avatar janhoogeveen commented on July 26, 2024

Tested it out on a big project and automocking seems to work great now. Thanks for the fix! This is really gonna help us.

(By the way, npm install still installs 1.0.3 so I had to test with npm link to test out 1.0.4)

from cypressautomocker.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.