Uh oh!
There was an error while loading. Please reload this page.
doc: add information about Assert behavior and maintenance - #3330
Conversation
cjihrig
commented
Oct 12, 2015
LGTM, assuming we're going with the docs only approach. |
There was a problem hiding this comment.
I wonder if we should push this to 4 - locked.
There was a problem hiding this comment.
That would probably be a TSC decision, yes?
There was a problem hiding this comment.
FWIW, 3 is locked. Also, I thought there was talk about just getting rid of the stability index stuff altogether in the project. But I can't seem to find that right now. Maybe I imagined it...
There was a problem hiding this comment.
Yeah, I remember that too. Might be good to run this by the TSC in general... I'll tag it tsc-agenda.
There was a problem hiding this comment.
I'm not actually sure I agree with this, since it already exists.
Might as well just deprecate it then, no?
There was a problem hiding this comment.
Yeah, at least a docs-only deprecation if that's the way it's supposed to be. @domenic tagged this tsc-agenda, so maybe there can be consensus at the next TSC meeting on whether or not assert is a general use library or really just intended for use in the Node.js project. If there's general agreement on that, one way or the other, everything flows naturally from it. (Internal use? Doc update only. General purpose? Surely the current surprising behavior should be considered a defect, albeit one that should be fixed carefully and not rushed.)
There was a problem hiding this comment.
I've been using assert for years because its publicly documented and serves all my needs. The "node only" route ship sailed a long time ago IMO.
Fishrock123
commented
Oct 13, 2015
FWIW I think |
Trott
commented
Oct 13, 2015
@Fishrock123 Regarding Node 4.2.0: With #3124: I suppose I could try to revise the code so that it only does this for |
Trott
commented
Oct 16, 2015
Now that the TSC has elected to lock the
|
cjihrig
commented
Oct 17, 2015
Still LGTM |
Trott
commented
Oct 18, 2015
I'll land this in about 24 hours unless someone has an objection. A second LGTM from a @nodejs/tsc member would be appreciated, just to cement the "Yes, we concluded this API should be Locked" aspect. |
indutny
commented
Oct 18, 2015
LGTM |
rvagg
commented
Oct 19, 2015
lgtm |
Assert is now locked. Userland alternatives should be used. Assert is for testing Node.js itself. Document potentially surprising use of enumerable properties only in deep equality assertions. Ref: nodejs#3124 Ref: nodejs#3122 PR-URL: nodejs#3330 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Trott
commented
Oct 19, 2015
Landed in f875c73 |
Assert is now locked. Userland alternatives should be used. Assert is for testing Node.js itself. Document potentially surprising use of enumerable properties only in deep equality assertions. Ref: #3124 Ref: #3122 PR-URL: #3330 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Rod Vagg <rod@vagg.org>
Assert is now locked. Userland alternatives should be used. Assert is for testing Node.js itself. Document potentially surprising use of enumerable properties only in deep equality assertions. Ref: #3124 Ref: #3122 PR-URL: #3330 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Rod Vagg <rod@vagg.org>
jasnell
commented
Oct 26, 2015
Landed in v4.x-staging in 4023c7d |
Assert is now locked. Userland alternatives should be used. Assert is for testing Node.js itself. Document potentially surprising use of enumerable properties only in deep equality assertions. Ref: #3124 Ref: #3122 PR-URL: #3330 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com> Reviewed-By: Rod Vagg <rod@vagg.org>
DanLipsitt
commented
Dec 4, 2015
I've been looking for an explanation of why it's bad to use node's assert outside node itself. I understand the message that it isn't intended for that purpose, but is there anything about it that makes it actually bad? I see it used a fair amount in testing tutorials around the web. |
tflanagan
commented
Dec 4, 2015
No, there is nothing that makes it bad for external use, and the API is locked so you can be assured it won't change (minus some huge issue down the road that no one can foresee) |
Trott
commented
Dec 4, 2015
There are indeed some issues with it, and the reason you shouldn't use it is because those issues will not be fixed. For example, this does not throw an These sorts of problems would likely be fixed in a userland assertion library. |
Doc that:
assertis for Node.js testing itself and not intended for general usedeepEqual()only considers enumerable propertiesRef: #3124
Ref: #3122