chaijs / sinon-chai

Extends Chai with assertions for the Sinon.JS mocking framework.
Other
1.09k stars 108 forks source link

Update sinon-chai to use latest versions of chai and sinon #162

Open neverbot opened 9 months ago

neverbot commented 9 months ago

I'm trying to update this package to be used with the new version of chai (from v4 to v5), and sinon (from v9 to v17). chai is now an ESM module, so this package must be migrated to ESM too. This would solve #160.

[!IMPORTANT] There is a different PR from @robinbisping (#161) that updates "just" chai and I think works fine, should be accepted first. This one tries to update both chai and sinon and it's not working yet.

Done:

Need reviewing:

Need to fix: There are 5 tests which i'm not able to fix:

koddsson commented 5 months ago

Hey @neverbot; sorry for the very late reply. Could you resolve the conflicts here if you are still interested in landing this PR?

neverbot commented 5 months ago

Hey @neverbot; sorry for the very late reply. Could you resolve the conflicts here if you are still interested in landing this PR?

Hi @koddsson, this PR was not 100% working, when I tried to update the sinon version, some of the error messages returned from sinon changed, and I have not enough knowledge about this to know if it was my fault or just some inner changes in sinon.

I've seen you've already used ESM modules, which was half the PR, kudos!

If somebody else (with more knowledge about sinon than me) wants to cherry-pick some commit from here, feel free to do it. Either case, we could close the PR.

43081j commented 5 months ago

im happy to sort it out unless you want to @koddsson

let me know

koddsson commented 5 months ago

@43081j Sounds good :)

@neverbot Sorry again for the very late reply. We are really appreciative of you taking the time to work on this <3