-
-
Notifications
You must be signed in to change notification settings - Fork 3
Sync with latest master #1
Comments
This module was made so AVA could have a consistent base for users. We've since moved away from using the core assert methods for everything except for So what I'm saying is that I don't really have the time or motivation to update this, but I would gladly take a pull request. |
Interesting. Out of curiosity: what is weird about the assert module and how do you think should it behave instead so it would be more useful? I guess one of the things is that you can not get true / false back? |
Many things. I can't recall everything right now. For example, the assertions are loose by default, so many uses |
We are definitely on the same page that the loose equality is really bad in many ways. It should probably not be used at all and I am going to open a PR to doc-only deprecate it soon. When using strict equality it does behave nicely though. One very important point about the assert module - it is not locked anymore and it got improved a lot already plus a few more things that will land soon. The changes include correctness, performance and feature improvements. I had a look at concordance and the comparison done there is pretty nice in general and it is very similar to the way assert handles it now. A few things that I personally would handle differently
There is a point of doing that too though and I am thinking about having something like that optional (not for assert directly but for something new). If I am correct these will be the only differences in deepStrictEqual compared to concordance soon. I open a PR against core-assert when the mentioned PRs landed. |
But |
I quote MDN:
|
And the insertion order is something ignored while comparing e.g., plain objects. |
I am aware of that change and the reasoning but this does not change that I still think it makes sense to ignore the insertion order. |
I agree it's probably the most common use-case to not want the order compared, but that could result in silent bugs when it actually does matter. Seems like there might be worth having an additional |
@BridgeAR What does that sentence mean? Is a Map "a map of an object", or are they referring to (somehow) creating a map of an object? |
It's now deprecated. |
Node.js 8 added support for Set and Map and the performance improved a lot in general. Therefore it would probably be good to consider updating this again.
The text was updated successfully, but these errors were encountered: