chaijs / chai

BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
https://chaijs.github.io
MIT License
8.15k stars 698 forks source link

Allow deepEqual fonction to be configured globally (4.x.x branch) #1553

Closed forty closed 11 months ago

forty commented 11 months ago

Identical change as https://github.com/chaijs/chai/pull/1551 on 4.x.x branch

forty commented 11 months ago

Thanks @43081j for the review!

Happy new year to the Chai team and congrats on the v5 release :clap:

I assume you must be busy handling "after sales" of the release, but do you think this MR could be merged and released any time soon?

Thanks!

koddsson commented 11 months ago

Let me see if I can publish this without breaking everything 😅

koddsson commented 11 months ago

Should be out there now in v4.4.0

forty commented 11 months ago

Awesome, thanks a lot @koddsson ! Everything looks good on my side (and you haven't override the latest tag ;) )

koddsson commented 10 months ago

and you haven't override the latest tag ;)

Oh but I did for a couple of minutes 😭

link2xt commented 10 months ago

This broke our CI: https://github.com/deltachat/deltachat-core-rust/issues/5153

Fails with:


> deltachat-node@1.132.1 test:mocha
> mocha -r esm node/test/test.js --growl --reporter=spec --bail --exit

notification support prerequisites not installed... cannot enable!

/home/runner/work/deltachat-core-rust/deltachat-core-rust/node_modules/chai/lib/chai/assertion.js:69
    flag(this, 'eql', config.deepEqual ?? util.eql);
                                        ^

SyntaxError: Invalid or unexpected token
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
Error: Process completed with exit code 1.

CI runs node.js 18.19.0.

forty commented 10 months ago

Are you sure of your nodejs version? Nullish Coalescing operator ?? exists since nodejs 14.

$ podman run -it --rm node:18.19.0 -e 'console.log(undefined ?? "ok")'
ok
forty commented 10 months ago

Ok, I found the issue in your setup https://github.com/standard-things/esm/issues/909

Looks like you are using this "esm" package, which have been dead for a while, last publish was 5 years ago and the repo is archived, so I would not expect a fix :grimacing:

link2xt commented 10 months ago

Ok, I found the issue in your setup standard-things/esm#909

Looks like you are using this "esm" package, which have been dead for a while, last publish was 5 years ago and the repo is archived, so I would not expect a fix 😬

Thanks, I filed an issue to track this at https://github.com/deltachat/deltachat-core-rust/issues/5156 For now just pinned chai to the last version that worked.