Skip to content

Commit c2e818d

Browse files
DavidCai1111MylesBorins
authored andcommitted
doc: restrict the ES.Next features usage in tests
PR-URL: #11452 Refs: #11290 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 10413ca commit c2e818d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/guides/writing-tests.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,12 @@ assert.throws(
231231

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

237241
* `let` and `const` over `var`
238242
* Template literals over string concatenation

0 commit comments

Comments
 (0)