Skip to content
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: restrict the ES.Next features usage in tests #11452

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions doc/guides/writing-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,12 @@ assert.throws(

For performance considerations, we only use a selected subset of ES.Next
features in JavaScript code in the `lib` directory. However, when writing
tests, it is encouraged to use ES.Next features that have already landed
in the ECMAScript specification. For example:
tests, for the ease of backporting, it is encouraged to use those ES.Next
features that can be used directly without a flag in [all maintained branches]
(https://github.com/nodejs/lts), you can check [node.green](http://node.green)
for all available features in each release.

For example:

* `let` and `const` over `var`
* Template literals over string concatenation
Expand Down