Browse Source

doc: restrict the ES.Next features usage in tests

PR-URL: https://github.com/nodejs/node/pull/11452
Refs: https://github.com/nodejs/node/pull/11290
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
DavidCai 8 years ago
committed by Myles Borins
parent
commit
227cc1e810
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 8
      doc/guides/writing-tests.md

8
doc/guides/writing-tests.md

@ -231,8 +231,12 @@ assert.throws(
For performance considerations, we only use a selected subset of ES.Next For performance considerations, we only use a selected subset of ES.Next
features in JavaScript code in the `lib` directory. However, when writing features in JavaScript code in the `lib` directory. However, when writing
tests, it is encouraged to use ES.Next features that have already landed tests, for the ease of backporting, it is encouraged to use those ES.Next
in the ECMAScript specification. For example: 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` * `let` and `const` over `var`
* Template literals over string concatenation * Template literals over string concatenation

Loading…
Cancel
Save