-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add esm examples for assert #37607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a preference for keeping the default import for assert
(assert.throws
, assert.ok
, assert.fail
, etc.), but not blocking.
@nodejs/documentation @nodejs/assert @nodejs/modules |
I hesitate to say this because I know doing this was a lot of work to begin with, but I'm with @aduh95 on the named imports. I'd prefer we do default exports because (Full disclosure: I happen to think destructuring/named imports are a bit of an anti-pattern. If I have two modules with a |
What?! Lol... I'm not worried about the work involved, it's really not that much. |
Signed-off-by: James M Snell <jasnell@gmail.com>
5e11215
to
2306a36
Compare
There, I fixed it for you picky folk 😁🤣 |
altho tbh the |
Landed in a8b5cdc |
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37607 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #37607 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
ESM example variants in preparation for #37162
/cc @aduh95
Signed-off-by: James M Snell jasnell@gmail.com