Git Product home page Git Product logo

Comments (7)

ericuldall avatar ericuldall commented on August 15, 2024 2

I had a ticket open with collections that I've reopened with a link here. We'll see if they have anything good to contribute here.

Also, if anyone else is having this issue and needs a quick fix for now we've just added this to our top level package:

"@sinonjs/commons": "1.4.0"

Works for now :D

from commons.

ericuldall avatar ericuldall commented on August 15, 2024

Testing steps:

npm list | grep sinon

returns @sinonjs/commons is at 1.6.0 and tests are failing

rm -rf node_modules/@sinonjs/commons;
npm install @sinonjs/[email protected]

After that npm test works again.

from commons.

mroderick avatar mroderick commented on August 15, 2024

I can sympathise with your challenges of having many tests fail because of a dependency update.

However, cace9e6 is a very unobtrusive change, that shouldn't cause anything to fail.

For the Sinon family of libraries we try our best to avoid clashes with other libraries (which is the motivation for cace9e6), but we can't anticipate that another library would modify the builtin prototypes.

I suspect that the real problem here is that you're using a library that extends the prototypes: https://github.com/montagejs/collections

As a quick fix, you might get lucky with loading collections after @sinonjs/commons has loaded.

For background, I'd recommend reading:

from commons.

nickyang07 avatar nickyang07 commented on August 15, 2024

I also have exactly the same issue. For me, it fails jest. I could not enforce @sinonjs/commons to 1.4.0, since jest fake-timer depends on it. Any other solution?

from commons.

mroderick avatar mroderick commented on August 15, 2024

I also have exactly the same issue. For me, it fails jest. I could not enforce @sinonjs/commons to 1.4.0, since jest fake-timer depends on it. Any other solution?

Jest and Sinon have been playing well together for years, I'm not sure this is the same issue. Please open a new issue following the issue template and if you can, please provide a runnable example that shows the failure

from commons.

cmyugovic avatar cmyugovic commented on August 15, 2024

I made it work with:
"sinon": "^7.0.0",
"@sinonjs/commons": "1.4.0",
"nise": "1.5.2"

from commons.

caub avatar caub commented on August 15, 2024

What fixes this issue for me if moving require('sinon') up to the top of the file

from commons.

Related Issues (9)

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.